Mercurial > sdl-ios-xcode
comparison test/testwm2.c @ 1719:5b9f50c957ed SDL-1.3
You can now create multiple windows on Win32
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Wed, 28 Jun 2006 08:12:07 +0000 |
parents | 3e66ed1690e4 |
children | 98a3207ddde8 |
comparison
equal
deleted
inserted
replaced
1718:ed4d4f1ea201 | 1719:5b9f50c957ed |
---|---|
62 fprintf(stderr, "Out of memory!\n"); | 62 fprintf(stderr, "Out of memory!\n"); |
63 quit(2); | 63 quit(2); |
64 } | 64 } |
65 for (i = 0; i < num_windows; ++i) { | 65 for (i = 0; i < num_windows; ++i) { |
66 char title[32]; | 66 char title[32]; |
67 int x, y; | |
67 | 68 |
68 SDL_snprintf(title, sizeof(title), "testwm %d", i + 1); | 69 SDL_snprintf(title, sizeof(title), "testwm %d", i + 1); |
70 if (i == 0) { | |
71 x = SDL_WINDOWPOS_CENTERED; | |
72 y = SDL_WINDOWPOS_CENTERED; | |
73 } else { | |
74 x = SDL_WINDOWPOS_UNDEFINED; | |
75 y = SDL_WINDOWPOS_UNDEFINED; | |
76 } | |
69 windows[i] = | 77 windows[i] = |
70 SDL_CreateWindow(title, -1, -1, window_w, window_h, | 78 SDL_CreateWindow(title, x, y, window_w, window_h, |
71 SDL_WINDOW_SHOWN); | 79 SDL_WINDOW_SHOWN); |
72 if (!windows[i]) { | 80 if (!windows[i]) { |
73 fprintf(stderr, "Couldn't create window: %s\n", SDL_GetError()); | 81 fprintf(stderr, "Couldn't create window: %s\n", SDL_GetError()); |
74 quit(2); | 82 quit(2); |
75 } | 83 } |