comparison test/testnative.c @ 3060:4cf533f434d8

Implemented Win32 version of the native window test
author Sam Lantinga <slouken@libsdl.org>
date Mon, 09 Feb 2009 06:41:49 +0000
parents 089a77aebb7d
children 0267b8b1595c
comparison
equal deleted inserted replaced
3059:79b061c4f316 3060:4cf533f434d8
27 static void 27 static void
28 quit(int rc) 28 quit(int rc)
29 { 29 {
30 SDL_VideoQuit(); 30 SDL_VideoQuit();
31 if (native_window) { 31 if (native_window) {
32 factory->DestroyWindow(native_window); 32 factory->DestroyNativeWindow(native_window);
33 } 33 }
34 exit(rc); 34 exit(rc);
35 } 35 }
36 36
37 SDL_TextureID 37 SDL_TextureID
135 fprintf(stderr, "Couldn't find native window code for %s driver\n", 135 fprintf(stderr, "Couldn't find native window code for %s driver\n",
136 driver); 136 driver);
137 quit(2); 137 quit(2);
138 } 138 }
139 printf("Creating native window for %s driver\n", driver); 139 printf("Creating native window for %s driver\n", driver);
140 native_window = factory->CreateWindow(WINDOW_W, WINDOW_H); 140 native_window = factory->CreateNativeWindow(WINDOW_W, WINDOW_H);
141 if (!native_window) { 141 if (!native_window) {
142 fprintf(stderr, "Couldn't create native window\n"); 142 fprintf(stderr, "Couldn't create native window\n");
143 quit(3); 143 quit(3);
144 } 144 }
145 window = SDL_CreateWindowFrom(native_window); 145 window = SDL_CreateWindowFrom(native_window);