Create a fake desktop mode for windowed mode apps
authorSam Lantinga <slouken@libsdl.org>
Sun, 16 Jul 2006 03:35:44 +0000
changeset 1911 7577fd11cee4
parent 1910 c26194009c9c
child 1912 8d384b647307
Create a fake desktop mode for windowed mode apps
src/video/dummy/SDL_nullvideo.c
--- a/src/video/dummy/SDL_nullvideo.c	Sun Jul 16 03:32:06 2006 +0000
+++ b/src/video/dummy/SDL_nullvideo.c	Sun Jul 16 03:35:44 2006 +0000
@@ -109,7 +109,12 @@
 {
     SDL_DisplayMode mode;
 
-    SDL_AddBasicVideoDisplay(NULL);
+    /* Use a fake 32-bpp desktop mode */
+    mode.format = SDL_PixelFormat_RGB888;
+    mode.w = 1024;
+    mode.h = 768;
+    mode.refresh_rate = 0;
+    SDL_AddBasicVideoDisplay(&mode);
     SDL_AddRenderDriver(0, &SDL_DUMMY_RenderDriver);
 
     SDL_zero(mode);