| Summary: | SDL window does not appear with libsdl 1.2.15 and Mac OS X 10.11 | ||
|---|---|---|---|
| Product: | SDL | Reporter: | Fernando Lopez <challaganmadrid> |
| Component: | video | Assignee: | Sam Lantinga <slouken> |
| Status: | NEW --- | QA Contact: | Sam Lantinga <slouken> |
| Severity: | major | ||
| Priority: | P2 | CC: | adamgrayling, amaranth72, sezeroz |
| Version: | 1.2.15 | ||
| Hardware: | x86 | ||
| OS: | Mac OS X (All) | ||
Have you tried using the latest Mercurial code for SDL 1.2? (I definitely recommend upgrading to SDL 2 ASAP though, regardless). Hello, I have download SDL from Mercurial: hg clone http://hg.libsdl.org/SDL But this appear to be SDL2. Do you have any document describing how to download/compile SDL 1.2 from Mercurial? Thanks Switch to the branch 'SDL-1.2' after you've cloned it: hg update SDL-1.2 Hello, I have installed the last version with these commands: $hg clone http://hg.libsdl.org/SDL hg update SDL-1.2 ./autogen.sh # README.MacOSX does not include this step ./configure make sudo make install And it is still failing (the screen does not appear) with Mac OS X 10.11, but work ok with Mac OS X 10.10. I need to maintain compatibility with SDL 1.2. Could you double-check what is producing this error? Thanks (In reply to Fernando Lopez from comment #2) > Hello, > > I have download SDL from Mercurial: > > hg clone https://whatstatus.co/happy-birthday-meme > > But this appear to be SDL2. Do you have any document describing how to > download/compile SDL 1.2 from Mercurial? > > Thanks it is still failing (the screen does not appear) with Mac OS X 10.11, but work ok with Mac OS X 10.10. I need to maintain compatibility with SDL 1.2. Could you double-check what is producing this error? On the failing 10.11 setup, do you build SDL-1.2 yourself on that machine against new SDKs, or do you use the prebuilt ones downloaded from SDL download pages? Hello, You can reproduce this problem with the SDL library available in MacPorts: $sudo port installed libsdl The following ports are currently installed: libsdl @1.2.15_3+x11 (active) It also fails if I download and compile the code: $hg clone http://hg.libsdl.org/SDL hg update SDL-1.2 ./autogen.sh # README.MacOSX does not include this step ./configure make sudo make install Currently I am using Mac OS X 10.13 and also the window does not appear. (In reply to Fernando Lopez from comment #7) > It also fails if I download and compile the code: > > $hg clone http://hg.libsdl.org/SDL > hg update SDL-1.2 > ./autogen.sh # README.MacOSX does not include this step You don't need this step with current hg anymore > ./configure > make > sudo make install > > Currently I am using Mac OS X 10.13 and also the window does not appear. Do the above as you describe, but then replace libSDL-1.2.0.dylib from this: http://uhexen2.sourceforge.net/tmp/sdl12_dylib.tar.gz Does it work properly? (I cross-built this on linux from current hg repo against older SDKs.) If it does work (which I _guess_ it would), then this is possibly related to bug #4788. Hello Ozcan, The program link again this library, but the window is still not appearing. BTW, I am obtaining this warnings when I execute the program with your .dylib file: 2019-09-09 17:57:29.572052+0200 lab1[21219:5612241] SLPSGetCurrentProcess(): This call is deprecated and should not be called anymore. 2019-09-09 17:57:29.572083+0200 lab1[21219:5612241] set_foreground_operation_state(): This call is deprecated and should not be called anymore. 2019-09-09 17:57:29.656991+0200 lab1[21219:5612241] WARNING: The Gestalt selector gestaltSystemVersion is returning 10.9.6 instead of 10.13.6. This is not a bug in Gestalt -- it is a documented limitation. Use NSProcessInfo's operatingSystemVersion property to get correct system version number. Call location: 2019-09-09 17:57:29.657081+0200 lab1[21219:5612241] 0 CarbonCore 0x00007fff53bd5378 ___Gestalt_SystemVersion_block_invoke + 112 2019-09-09 17:57:29.657093+0200 lab1[21219:5612241] 1 libdispatch.dylib 0x000000010038cd8f _dispatch_client_callout + 8 2019-09-09 17:57:29.657101+0200 lab1[21219:5612241] 2 libdispatch.dylib 0x000000010038cd6f dispatch_once_f + 288 2019-09-09 17:57:29.657110+0200 lab1[21219:5612241] 3 CarbonCore 0x00007fff53b65c40 _Gestalt_SystemVersion + 948 2019-09-09 17:57:29.657118+0200 lab1[21219:5612241] 4 CarbonCore 0x00007fff53b65486 Gestalt + 139 Any additional idea? 2019-09-09 17:57:29.657126+0200 lab1[21219:5612241] 5 libSDL-1.2.0.dylib 0x000000010033aedb QZ_VideoInit + 43 2019-09-09 17:57:29.657134+0200 lab1[21219:5612241] 6 libSDL-1.2.0.dylib 0x000000010033306b SDL_VideoInit + 555 (In reply to Fernando Lopez from comment #9) > Hello Ozcan, > > The program link again this library, but the window is still not appearing. Huh.. No ideas for now (The problem is I don't have a new macOS setup to try on.) > > BTW, I am obtaining this warnings when I execute the program with your > .dylib file: > > 2019-09-09 17:57:29.572052+0200 lab1[21219:5612241] SLPSGetCurrentProcess(): > This call is deprecated and should not be called anymore. > 2019-09-09 17:57:29.572083+0200 lab1[21219:5612241] > set_foreground_operation_state(): This call is deprecated and should not be > called anymore. These should be bug 4114: I am guessing that your program is using the old version of SDLmain.m from 1.2.15 -- try using the SDLmain.m from hg / SDL-1.2 branch. > 2019-09-09 17:57:29.656991+0200 lab1[21219:5612241] WARNING: The Gestalt > selector gestaltSystemVersion is returning 10.9.6 instead of 10.13.6. This > is not a bug in Gestalt -- it is a documented limitation. Use > NSProcessInfo's operatingSystemVersion property to get correct system > version number. This comes from SDL-1.2's Quartz code - should be harmless. Also see: bug #4788 where a test-only patch was posted |
This code works with Mac OS X 10.9 and 10.10 showing a black window, but with Mac OS X 10.11 the window does not appear. #include <SDL.h> #define SCREEN_WIDTH 800 #define SCREEN_HEIGHT 640 #define SCREEN_COLOR_DEPTH 32 int main(int argc, char *argv[]) { SDL_Surface* screen = NULL; // Initialize SDL's main subsystem: video if (SDL_Init(SDL_INIT_VIDEO) < 0) { printf("Error al iniciar SDL: %s\n", SDL_GetError()); exit(1); } atexit(SDL_Quit); // Creates a surface windows screen = SDL_SetVideoMode(SCREEN_WIDTH, SCREEN_HEIGHT, SCREEN_COLOR_DEPTH, SDL_SWSURFACE); if (screen == NULL){ printf("Error initializing video mode: '%s'\n", SDL_GetError()); exit(1); } // Set the window title SDL_WM_SetCaption("Graphics primitives", NULL); // Dump the screen SDL_Flip(screen); // Wait 5000 ms SDL_Delay(5000); return 0; } I am linknig with sdl-config recommended flags: $ sdl-config --cflags --libs -I/opt/local/include/SDL -D_GNU_SOURCE=1 -D_THREAD_SAFE -L/opt/local/lib -lSDLmain -Wl,-framework,AppKit -lSDL -Wl,-framework,Cocoa Do you know how can I do it work with Mac OS X 10.11? Thanks