comparison src/video/gem/SDL_gemvideo.c @ 1361:19418e4422cb

New configure-based build system. Still work in progress, but much improved
author Sam Lantinga <slouken@libsdl.org>
date Thu, 16 Feb 2006 10:11:48 +0000
parents c71e05b4dc2e
children d910939febfa
comparison
equal deleted inserted replaced
1360:70a9cfb4cf1b 1361:19418e4422cb
35 #include <mint/cookie.h> 35 #include <mint/cookie.h>
36 36
37 #include "SDL_endian.h" 37 #include "SDL_endian.h"
38 #include "SDL_video.h" 38 #include "SDL_video.h"
39 #include "SDL_mouse.h" 39 #include "SDL_mouse.h"
40 #include "SDL_sysvideo.h" 40 #include "../SDL_sysvideo.h"
41 #include "SDL_pixels_c.h" 41 #include "../SDL_pixels_c.h"
42 #include "SDL_events_c.h" 42 #include "../../events/SDL_events_c.h"
43 #include "SDL_cursor_c.h" 43 #include "../SDL_cursor_c.h"
44 44
45 #include "SDL_ataric2p_s.h" 45 #include "SDL_ataric2p_s.h"
46 #include "SDL_atarieddi_s.h" 46 #include "SDL_atarieddi_s.h"
47 #include "SDL_atarimxalloc_c.h" 47 #include "SDL_atarimxalloc_c.h"
48 #include "SDL_atarigl_c.h" 48 #include "SDL_atarigl_c.h"
98 static void GEM_SetNewPalette(_THIS, Uint16 newpal[256][3]); 98 static void GEM_SetNewPalette(_THIS, Uint16 newpal[256][3]);
99 static void GEM_LockScreen(_THIS); 99 static void GEM_LockScreen(_THIS);
100 static void GEM_UnlockScreen(_THIS); 100 static void GEM_UnlockScreen(_THIS);
101 static void refresh_window(_THIS, int winhandle, short *rect); 101 static void refresh_window(_THIS, int winhandle, short *rect);
102 102
103 #ifdef HAVE_OPENGL 103 #if SDL_VIDEO_OPENGL
104 /* OpenGL functions */ 104 /* OpenGL functions */
105 static void GEM_GL_SwapBuffers(_THIS); 105 static void GEM_GL_SwapBuffers(_THIS);
106 #endif 106 #endif
107 107
108 /* GEM driver bootstrap functions */ 108 /* GEM driver bootstrap functions */
177 device->CreateWMCursor = GEM_CreateWMCursor; 177 device->CreateWMCursor = GEM_CreateWMCursor;
178 device->ShowWMCursor = GEM_ShowWMCursor; 178 device->ShowWMCursor = GEM_ShowWMCursor;
179 device->WarpWMCursor = NULL /*GEM_WarpWMCursor*/; 179 device->WarpWMCursor = NULL /*GEM_WarpWMCursor*/;
180 device->CheckMouseMode = GEM_CheckMouseMode; 180 device->CheckMouseMode = GEM_CheckMouseMode;
181 181
182 #ifdef HAVE_OPENGL 182 #if SDL_VIDEO_OPENGL
183 /* OpenGL functions */ 183 /* OpenGL functions */
184 device->GL_LoadLibrary = SDL_AtariGL_LoadLibrary; 184 device->GL_LoadLibrary = SDL_AtariGL_LoadLibrary;
185 device->GL_GetProcAddress = SDL_AtariGL_GetProcAddress; 185 device->GL_GetProcAddress = SDL_AtariGL_GetProcAddress;
186 device->GL_GetAttribute = SDL_AtariGL_GetAttribute; 186 device->GL_GetAttribute = SDL_AtariGL_GetAttribute;
187 device->GL_MakeCurrent = SDL_AtariGL_MakeCurrent; 187 device->GL_MakeCurrent = SDL_AtariGL_MakeCurrent;
453 SDL_modelist[0]->w = VDI_w; 453 SDL_modelist[0]->w = VDI_w;
454 SDL_modelist[0]->h = VDI_h; 454 SDL_modelist[0]->h = VDI_h;
455 455
456 SDL_modelist[1] = NULL; 456 SDL_modelist[1] = NULL;
457 457
458 #ifdef HAVE_OPENGL 458 #if SDL_VIDEO_OPENGL
459 SDL_AtariGL_InitPointers(this); 459 SDL_AtariGL_InitPointers(this);
460 #endif 460 #endif
461 461
462 /* We're done! */ 462 /* We're done! */
463 return(0); 463 return(0);
794 } else { 794 } else {
795 current->pixels = VDI_screen; 795 current->pixels = VDI_screen;
796 current->pitch = VDI_pitch; 796 current->pitch = VDI_pitch;
797 } 797 }
798 798
799 #ifdef HAVE_OPENGL 799 #if SDL_VIDEO_OPENGL
800 if (flags & SDL_OPENGL) { 800 if (flags & SDL_OPENGL) {
801 if (!SDL_AtariGL_Init(this, current)) { 801 if (!SDL_AtariGL_Init(this, current)) {
802 GEM_FreeBuffers(this); 802 GEM_FreeBuffers(this);
803 SDL_SetError("Can not create OpenGL context"); 803 SDL_SetError("Can not create OpenGL context");
804 return NULL; 804 return NULL;
1094 { 1094 {
1095 SDL_AtariXbios_RestoreVectors(); 1095 SDL_AtariXbios_RestoreVectors();
1096 1096
1097 GEM_FreeBuffers(this); 1097 GEM_FreeBuffers(this);
1098 1098
1099 #ifdef HAVE_OPENGL 1099 #if SDL_VIDEO_OPENGL
1100 if (gl_active) { 1100 if (gl_active) {
1101 SDL_AtariGL_Quit(this, SDL_TRUE); 1101 SDL_AtariGL_Quit(this, SDL_TRUE);
1102 } 1102 }
1103 #endif 1103 #endif
1104 1104
1316 #endif 1316 #endif
1317 1317
1318 vro_cpyfm( VDI_handle, S_ONLY, pxy, &mfdb_src, &VDI_dst_mfdb); 1318 vro_cpyfm( VDI_handle, S_ONLY, pxy, &mfdb_src, &VDI_dst_mfdb);
1319 } 1319 }
1320 1320
1321 #ifdef HAVE_OPENGL 1321 #if SDL_VIDEO_OPENGL
1322 1322
1323 static void GEM_GL_SwapBuffers(_THIS) 1323 static void GEM_GL_SwapBuffers(_THIS)
1324 { 1324 {
1325 SDL_AtariGL_SwapBuffers(this); 1325 SDL_AtariGL_SwapBuffers(this);
1326 GEM_FlipHWSurface(this, this->screen); 1326 GEM_FlipHWSurface(this, this->screen);