Mercurial > sdl-ios-xcode
changeset 4501:0cf025066b6f
Updated Xcode project files for clipboard API
Fixed generation of SDL_revision.h when hg is in the path set up in .bash_profile
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Thu, 08 Jul 2010 06:16:27 -0700 |
parents | eff4e88cc1e8 |
children | b3540fa08474 |
files | Xcode-iPhoneOS/SDL/SDLiPhoneOS.xcodeproj/project.pbxproj Xcode/SDL/SDL.xcodeproj/project.pbxproj src/video/cocoa/SDL_cocoaclipboard.m |
diffstat | 3 files changed, 67 insertions(+), 31 deletions(-) [+] |
line wrap: on
line diff
--- a/Xcode-iPhoneOS/SDL/SDLiPhoneOS.xcodeproj/project.pbxproj Thu Jul 08 05:43:34 2010 -0700 +++ b/Xcode-iPhoneOS/SDL/SDLiPhoneOS.xcodeproj/project.pbxproj Thu Jul 08 06:16:27 2010 -0700 @@ -67,6 +67,9 @@ 043DD77110FD8A0000DED673 /* SDL_blendfillrect.c in Sources */ = {isa = PBXBuildFile; fileRef = 043DD76D10FD8A0000DED673 /* SDL_blendfillrect.c */; }; 043DD77210FD8A0000DED673 /* SDL_drawrect.c in Sources */ = {isa = PBXBuildFile; fileRef = 043DD76E10FD8A0000DED673 /* SDL_drawrect.c */; }; 04461DEE0EA76BA3006C462D /* SDL_haptic.h in Headers */ = {isa = PBXBuildFile; fileRef = 04461DED0EA76BA3006C462D /* SDL_haptic.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 044E5FB511E6069F0076F181 /* SDL_clipboard.h in Headers */ = {isa = PBXBuildFile; fileRef = 044E5FB311E6069F0076F181 /* SDL_clipboard.h */; }; + 044E5FB611E6069F0076F181 /* SDL_input.h in Headers */ = {isa = PBXBuildFile; fileRef = 044E5FB411E6069F0076F181 /* SDL_input.h */; }; + 044E5FB811E606EB0076F181 /* SDL_clipboard.c in Sources */ = {isa = PBXBuildFile; fileRef = 044E5FB711E606EB0076F181 /* SDL_clipboard.c */; }; 0463873F0F0B5B7D0041FD65 /* SDL_blendline.c in Sources */ = {isa = PBXBuildFile; fileRef = 046387370F0B5B7D0041FD65 /* SDL_blendline.c */; }; 046387400F0B5B7D0041FD65 /* SDL_blendpoint.c in Sources */ = {isa = PBXBuildFile; fileRef = 046387380F0B5B7D0041FD65 /* SDL_blendpoint.c */; }; 046387410F0B5B7D0041FD65 /* SDL_blendrect.c in Sources */ = {isa = PBXBuildFile; fileRef = 046387390F0B5B7D0041FD65 /* SDL_blendrect.c */; }; @@ -313,6 +316,9 @@ 043DD76D10FD8A0000DED673 /* SDL_blendfillrect.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_blendfillrect.c; sourceTree = "<group>"; }; 043DD76E10FD8A0000DED673 /* SDL_drawrect.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_drawrect.c; sourceTree = "<group>"; }; 04461DED0EA76BA3006C462D /* SDL_haptic.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SDL_haptic.h; path = ../../include/SDL_haptic.h; sourceTree = SOURCE_ROOT; }; + 044E5FB311E6069F0076F181 /* SDL_clipboard.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SDL_clipboard.h; path = ../../include/SDL_clipboard.h; sourceTree = SOURCE_ROOT; }; + 044E5FB411E6069F0076F181 /* SDL_input.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SDL_input.h; path = ../../include/SDL_input.h; sourceTree = SOURCE_ROOT; }; + 044E5FB711E606EB0076F181 /* SDL_clipboard.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_clipboard.c; sourceTree = "<group>"; }; 046387370F0B5B7D0041FD65 /* SDL_blendline.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_blendline.c; sourceTree = "<group>"; }; 046387380F0B5B7D0041FD65 /* SDL_blendpoint.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_blendpoint.c; sourceTree = "<group>"; }; 046387390F0B5B7D0041FD65 /* SDL_blendrect.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_blendrect.c; sourceTree = "<group>"; }; @@ -826,19 +832,23 @@ FD99B8BC0DD52E5C00FB1D6B /* Public Headers */ = { isa = PBXGroup; children = ( - 04F2AF531104ABC300D6DDF7 /* SDL_assert.h */, - 04B2ECE61025CE4800F9BC5F /* SDL_atomic.h */, FD99B8CC0DD52EB400FB1D6B /* begin_code.h */, FD99B8CD0DD52EB400FB1D6B /* close_code.h */, + FD99B8F50DD52EB400FB1D6B /* SDL.h */, + 04F2AF531104ABC300D6DDF7 /* SDL_assert.h */, + 04B2ECE61025CE4800F9BC5F /* SDL_atomic.h */, FD99B8CF0DD52EB400FB1D6B /* SDL_audio.h */, + 044E5FB311E6069F0076F181 /* SDL_clipboard.h */, FD99B8D10DD52EB400FB1D6B /* SDL_compat.h */, + 04B2ED061025CF9E00F9BC5F /* SDL_config.h */, 04EC8B501025D12900431D42 /* SDL_config_iphoneos.h */, - 04B2ED061025CF9E00F9BC5F /* SDL_config.h */, FD99B8DA0DD52EB400FB1D6B /* SDL_copying.h */, FD99B8DB0DD52EB400FB1D6B /* SDL_cpuinfo.h */, + FD99B8F60DD52EB400FB1D6B /* SDL_endian.h */, FD99B8DC0DD52EB400FB1D6B /* SDL_error.h */, FD99B8DD0DD52EB400FB1D6B /* SDL_events.h */, 04461DED0EA76BA3006C462D /* SDL_haptic.h */, + 044E5FB411E6069F0076F181 /* SDL_input.h */, FD99B8DE0DD52EB400FB1D6B /* SDL_joystick.h */, FD99B8DF0DD52EB400FB1D6B /* SDL_keyboard.h */, FD99B8E00DD52EB400FB1D6B /* SDL_keysym.h */, @@ -865,8 +875,6 @@ FD99B8F20DD52EB400FB1D6B /* SDL_types.h */, FD99B8F30DD52EB400FB1D6B /* SDL_version.h */, FD99B8F40DD52EB400FB1D6B /* SDL_video.h */, - FD99B8F50DD52EB400FB1D6B /* SDL.h */, - FD99B8F60DD52EB400FB1D6B /* SDL_endian.h */, ); name = "Public Headers"; sourceTree = "<group>"; @@ -1023,6 +1031,7 @@ FDA682420DF2374D00F98A1A /* video */ = { isa = PBXGroup; children = ( + 044E5FB711E606EB0076F181 /* SDL_clipboard.c */, FD689F090E26E5D900F90B21 /* uikit */, FDA685F40DF244C800F98A1A /* dummy */, 0495E6850E97408800152DFE /* SDL_glfuncs.h */, @@ -1173,6 +1182,8 @@ 043DD77010FD8A0000DED673 /* SDL_alphamult.h in Headers */, 04F2AF541104ABC300D6DDF7 /* SDL_assert.h in Headers */, 006E9888119552DD001DE610 /* SDL_rwopsbundlesupport.h in Headers */, + 044E5FB511E6069F0076F181 /* SDL_clipboard.h in Headers */, + 044E5FB611E6069F0076F181 /* SDL_input.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -1411,6 +1422,7 @@ 56ED04E1118A8EE200A56AA6 /* SDL_power.c in Sources */, 56ED04E3118A8EFD00A56AA6 /* SDL_syspower.m in Sources */, 006E9889119552DD001DE610 /* SDL_rwopsbundlesupport.m in Sources */, + 044E5FB811E606EB0076F181 /* SDL_clipboard.c in Sources */, ); runOnlyForDeploymentPostprocessing = 0; };
--- a/Xcode/SDL/SDL.xcodeproj/project.pbxproj Thu Jul 08 05:43:34 2010 -0700 +++ b/Xcode/SDL/SDL.xcodeproj/project.pbxproj Thu Jul 08 06:16:27 2010 -0700 @@ -438,6 +438,8 @@ 00D8DA281195093100638393 /* SDL_at.c in Sources */ = {isa = PBXBuildFile; fileRef = 00D8DA151195093100638393 /* SDL_at.c */; }; 00D8DA291195093100638393 /* surface.c in Sources */ = {isa = PBXBuildFile; fileRef = 00D8DA181195093100638393 /* surface.c */; }; 00D8DA2A1195093100638393 /* testsdl.c in Sources */ = {isa = PBXBuildFile; fileRef = 00D8DA1A1195093100638393 /* testsdl.c */; }; + 044E5F8511E6051C0076F181 /* SDL_clipboard.h in Headers */ = {isa = PBXBuildFile; fileRef = 044E5F8411E6051C0076F181 /* SDL_clipboard.h */; }; + 044E5F8611E6051C0076F181 /* SDL_clipboard.h in Headers */ = {isa = PBXBuildFile; fileRef = 044E5F8411E6051C0076F181 /* SDL_clipboard.h */; }; 046B91EC0A11B53500FB151C /* SDL_sysloadso.c in Sources */ = {isa = PBXBuildFile; fileRef = 046B91E90A11B53500FB151C /* SDL_sysloadso.c */; }; 046B91ED0A11B53500FB151C /* SDL_sysloadso.c in Sources */ = {isa = PBXBuildFile; fileRef = 046B91E90A11B53500FB151C /* SDL_sysloadso.c */; }; 046B92130A11B8AD00FB151C /* SDL_dlcompat.c in Sources */ = {isa = PBXBuildFile; fileRef = 046B92100A11B8AD00FB151C /* SDL_dlcompat.c */; }; @@ -446,6 +448,14 @@ 04DB838D10FD8C81000519B5 /* SDL_drawrect.c in Sources */ = {isa = PBXBuildFile; fileRef = 04DB838B10FD8C81000519B5 /* SDL_drawrect.c */; }; 04DB838E10FD8C81000519B5 /* SDL_blendfillrect.c in Sources */ = {isa = PBXBuildFile; fileRef = 04DB838A10FD8C81000519B5 /* SDL_blendfillrect.c */; }; 04DB838F10FD8C81000519B5 /* SDL_drawrect.c in Sources */ = {isa = PBXBuildFile; fileRef = 04DB838B10FD8C81000519B5 /* SDL_drawrect.c */; }; + 04DEA57111E6006A00386CAC /* SDL_input.h in Headers */ = {isa = PBXBuildFile; fileRef = 04DEA56F11E6006A00386CAC /* SDL_input.h */; }; + 04DEA57311E6006A00386CAC /* SDL_input.h in Headers */ = {isa = PBXBuildFile; fileRef = 04DEA56F11E6006A00386CAC /* SDL_input.h */; }; + 04DEA57511E6009000386CAC /* SDL_clipboard.c in Sources */ = {isa = PBXBuildFile; fileRef = 04DEA57411E6009000386CAC /* SDL_clipboard.c */; }; + 04DEA57611E6009000386CAC /* SDL_clipboard.c in Sources */ = {isa = PBXBuildFile; fileRef = 04DEA57411E6009000386CAC /* SDL_clipboard.c */; }; + 04DEA57911E600A600386CAC /* SDL_cocoaclipboard.h in Headers */ = {isa = PBXBuildFile; fileRef = 04DEA57711E600A600386CAC /* SDL_cocoaclipboard.h */; }; + 04DEA57A11E600A600386CAC /* SDL_cocoaclipboard.m in Sources */ = {isa = PBXBuildFile; fileRef = 04DEA57811E600A600386CAC /* SDL_cocoaclipboard.m */; }; + 04DEA57B11E600A600386CAC /* SDL_cocoaclipboard.h in Headers */ = {isa = PBXBuildFile; fileRef = 04DEA57711E600A600386CAC /* SDL_cocoaclipboard.h */; }; + 04DEA57C11E600A600386CAC /* SDL_cocoaclipboard.m in Sources */ = {isa = PBXBuildFile; fileRef = 04DEA57811E600A600386CAC /* SDL_cocoaclipboard.m */; }; 04F2AF661104AC0800D6DDF7 /* SDL_assert.c in Sources */ = {isa = PBXBuildFile; fileRef = 04F2AF651104AC0800D6DDF7 /* SDL_assert.c */; }; 04F2AF671104AC0800D6DDF7 /* SDL_assert.c in Sources */ = {isa = PBXBuildFile; fileRef = 04F2AF651104AC0800D6DDF7 /* SDL_assert.c */; }; 04F2AF691104AC4500D6DDF7 /* SDL_assert.h in Headers */ = {isa = PBXBuildFile; fileRef = 04F2AF681104AC4500D6DDF7 /* SDL_assert.h */; }; @@ -795,10 +805,15 @@ 01538439006D7D947F000001 /* SDL_fatal.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = SDL_fatal.c; path = ../../src/SDL_fatal.c; sourceTree = SOURCE_ROOT; }; 0153843C006D7D947F000001 /* SDL.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = SDL.c; path = ../../src/SDL.c; sourceTree = SOURCE_ROOT; }; 01538445006D7EC67F000001 /* SDL_thread.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = SDL_thread.c; path = ../../src/thread/SDL_thread.c; sourceTree = SOURCE_ROOT; }; + 044E5F8411E6051C0076F181 /* SDL_clipboard.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SDL_clipboard.h; path = ../../include/SDL_clipboard.h; sourceTree = SOURCE_ROOT; }; 046B91E90A11B53500FB151C /* SDL_sysloadso.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = SDL_sysloadso.c; sourceTree = "<group>"; }; 046B92100A11B8AD00FB151C /* SDL_dlcompat.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = SDL_dlcompat.c; sourceTree = "<group>"; }; 04DB838A10FD8C81000519B5 /* SDL_blendfillrect.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_blendfillrect.c; sourceTree = "<group>"; }; 04DB838B10FD8C81000519B5 /* SDL_drawrect.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_drawrect.c; sourceTree = "<group>"; }; + 04DEA56F11E6006A00386CAC /* SDL_input.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SDL_input.h; path = ../../include/SDL_input.h; sourceTree = SOURCE_ROOT; }; + 04DEA57411E6009000386CAC /* SDL_clipboard.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_clipboard.c; sourceTree = "<group>"; }; + 04DEA57711E600A600386CAC /* SDL_cocoaclipboard.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_cocoaclipboard.h; sourceTree = "<group>"; }; + 04DEA57811E600A600386CAC /* SDL_cocoaclipboard.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SDL_cocoaclipboard.m; sourceTree = "<group>"; }; 04F2AF651104AC0800D6DDF7 /* SDL_assert.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = SDL_assert.c; path = ../../src/SDL_assert.c; sourceTree = SOURCE_ROOT; }; 04F2AF681104AC4500D6DDF7 /* SDL_assert.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SDL_assert.h; path = ../../include/SDL_assert.h; sourceTree = SOURCE_ROOT; }; 083E489D006D88D97F000001 /* SDL_joystick.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = SDL_joystick.c; sourceTree = "<group>"; }; @@ -1033,6 +1048,8 @@ 00CFA703106B498A00758660 /* cocoa */ = { isa = PBXGroup; children = ( + 04DEA57711E600A600386CAC /* SDL_cocoaclipboard.h */, + 04DEA57811E600A600386CAC /* SDL_cocoaclipboard.m */, 00CFA704106B498A00758660 /* SDL_cocoaevents.h */, 00CFA705106B498A00758660 /* SDL_cocoaevents.m */, 00CFA706106B498A00758660 /* SDL_cocoakeyboard.h */, @@ -1380,6 +1397,7 @@ 00CFA7FA106B49B600758660 /* SDL_blit.c */, 00CFA7FB106B49B600758660 /* SDL_blit.h */, 00CFA7FC106B49B600758660 /* SDL_bmp.c */, + 04DEA57411E6009000386CAC /* SDL_clipboard.c */, 00CFA7FD106B49B600758660 /* SDL_draw.h */, 00CFA7FE106B49B600758660 /* SDL_drawline.c */, 00CFA7FF106B49B600758660 /* SDL_drawpoint.c */, @@ -1420,12 +1438,13 @@ 0153844A006D81B07F000001 /* Public Headers */ = { isa = PBXGroup; children = ( - 04F2AF681104AC4500D6DDF7 /* SDL_assert.h */, 0C5AF5E501191D2B7F000001 /* begin_code.h */, 0C5AF5E601191D2B7F000001 /* close_code.h */, 0C5AF5FF01191D2B7F000001 /* SDL.h */, + 04F2AF681104AC4500D6DDF7 /* SDL_assert.h */, 00CFA67A106B44CE00758660 /* SDL_atomic.h */, 0C5AF5E801191D2B7F000001 /* SDL_audio.h */, + 044E5F8411E6051C0076F181 /* SDL_clipboard.h */, 00CFA67B106B44CE00758660 /* SDL_compat.h */, 00162D3709BD1FA90037C8D0 /* SDL_config.h */, 00162D3409BD1FA90037C8D0 /* SDL_config_macosx.h */, @@ -1435,6 +1454,7 @@ 0C5AF5ED01191D2B7F000001 /* SDL_error.h */, 0C5AF5EE01191D2B7F000001 /* SDL_events.h */, 00CFA67C106B44CE00758660 /* SDL_haptic.h */, + 04DEA56F11E6006A00386CAC /* SDL_input.h */, 0C5AF5F001191D2B7F000001 /* SDL_joystick.h */, 0C5AF5F101191D2B7F000001 /* SDL_keyboard.h */, 0C5AF5F201191D2B7F000001 /* SDL_keysym.h */, @@ -1743,6 +1763,9 @@ 00A6EBDA1078D569001EEA06 /* SDL_revision.h in Headers */, 04F2AF691104AC4500D6DDF7 /* SDL_assert.h in Headers */, 006E95B011952992001DE610 /* SDL_rwopsbundlesupport.h in Headers */, + 04DEA57111E6006A00386CAC /* SDL_input.h in Headers */, + 04DEA57911E600A600386CAC /* SDL_cocoaclipboard.h in Headers */, + 044E5F8511E6051C0076F181 /* SDL_clipboard.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -1843,6 +1866,9 @@ 00A6EBDB1078D569001EEA06 /* SDL_revision.h in Headers */, 04F2AF6A1104AC4500D6DDF7 /* SDL_assert.h in Headers */, 006E95B211952992001DE610 /* SDL_rwopsbundlesupport.h in Headers */, + 04DEA57311E6006A00386CAC /* SDL_input.h in Headers */, + 04DEA57B11E600A600386CAC /* SDL_cocoaclipboard.h in Headers */, + 044E5F8611E6051C0076F181 /* SDL_clipboard.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -2035,7 +2061,7 @@ ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "# The underlying scripts require calling hg to get revision info.\n# Since hg may not be in the standard Xcode path, I am sourcing .bashrc\n# But I don't know what to do if people are using other shells.\nsource ~/.bashrc\nsh ../../build-scripts/updaterev.sh\n"; + shellScript = "# The underlying scripts require calling hg to get revision info.\n# Since hg may not be in the standard Xcode path, I am sourcing .bashrc\n# But I don't know what to do if people are using other shells.\nif test -f ~/.bash_profile; then source ~/.bash_profile; fi\nif test -f ~/.bashrc; then source ~/.bashrc; fi\nsh ../../build-scripts/updaterev.sh\n"; }; 0083103E1072EA5700A531F1 /* ShellScript */ = { isa = PBXShellScriptBuildPhase; @@ -2202,6 +2228,8 @@ 04DB838D10FD8C81000519B5 /* SDL_drawrect.c in Sources */, 04F2AF661104AC0800D6DDF7 /* SDL_assert.c in Sources */, 006E95B111952992001DE610 /* SDL_rwopsbundlesupport.m in Sources */, + 04DEA57511E6009000386CAC /* SDL_clipboard.c in Sources */, + 04DEA57A11E600A600386CAC /* SDL_cocoaclipboard.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -2318,6 +2346,8 @@ 04DB838F10FD8C81000519B5 /* SDL_drawrect.c in Sources */, 04F2AF671104AC0800D6DDF7 /* SDL_assert.c in Sources */, 006E95B311952992001DE610 /* SDL_rwopsbundlesupport.m in Sources */, + 04DEA57611E6009000386CAC /* SDL_clipboard.c in Sources */, + 04DEA57C11E600A600386CAC /* SDL_cocoaclipboard.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; };
--- a/src/video/cocoa/SDL_cocoaclipboard.m Thu Jul 08 05:43:34 2010 -0700 +++ b/src/video/cocoa/SDL_cocoaclipboard.m Thu Jul 08 06:16:27 2010 -0700 @@ -23,20 +23,28 @@ #include "SDL_cocoavideo.h" +static NSString * +GetTextFormat(_THIS) +{ +#if MAC_OS_X_VERSION_MAX_ALLOWED < 1060 + return NSStringPboardType; +#else + SDL_VideoData *data = (SDL_VideoData *) _this->driverdata; + + if (data->osversion >= 0x1060) { + return NSPasteboardTypeString; + } else { + return NSStringPboardType; + } +#endif +} int Cocoa_SetClipboardText(_THIS, const char *text) { - SDL_VideoData *data = (SDL_VideoData *) _this->driverdata; NSAutoreleasePool *pool; NSPasteboard *pasteboard; - NSString *format; - - if (data->osversion >= 0x1060) { - format = NSPasteboardTypeString; - } else { - format = NSStringPboardType; - } + NSString *format = GetTextFormat(_this); pool = [[NSAutoreleasePool alloc] init]; @@ -52,19 +60,12 @@ char * Cocoa_GetClipboardText(_THIS) { - SDL_VideoData *data = (SDL_VideoData *) _this->driverdata; NSAutoreleasePool *pool; NSPasteboard *pasteboard; - NSString *format; + NSString *format = GetTextFormat(_this); NSString *available; char *text; - if (data->osversion >= 0x1060) { - format = NSPasteboardTypeString; - } else { - format = NSStringPboardType; - } - pool = [[NSAutoreleasePool alloc] init]; pasteboard = [NSPasteboard generalPasteboard]; @@ -92,19 +93,12 @@ SDL_bool Cocoa_HasClipboardText(_THIS) { - SDL_VideoData *data = (SDL_VideoData *) _this->driverdata; NSAutoreleasePool *pool; NSPasteboard *pasteboard; - NSString *format; + NSString *format = GetTextFormat(_this); NSString *available; SDL_bool result; - if (data->osversion >= 0x1060) { - format = NSPasteboardTypeString; - } else { - format = NSStringPboardType; - } - pool = [[NSAutoreleasePool alloc] init]; pasteboard = [NSPasteboard generalPasteboard];