diff options
author | Max Horn | 2002-07-23 10:51:17 +0000 |
---|---|---|
committer | Max Horn | 2002-07-23 10:51:17 +0000 |
commit | c80d11090ab55385e4cf14afd21823c5bf61a80e (patch) | |
tree | 4c7b792173ff763b15b582fe628200a61a55a940 | |
parent | 07966f6ccca7c3e944d1010eb6eb681c913dc281 (diff) | |
download | scummvm-rg350-c80d11090ab55385e4cf14afd21823c5bf61a80e.tar.gz scummvm-rg350-c80d11090ab55385e4cf14afd21823c5bf61a80e.tar.bz2 scummvm-rg350-c80d11090ab55385e4cf14afd21823c5bf61a80e.zip |
merged some diffs between sdl.cpp and sdl_gl.cpp. Ideally, one should be the subclass of the other, or they should share a common baseclass - a lot of code is duplicated, and we have to fix bugs in two places.
svn-id: r4622
-rw-r--r-- | sdl.cpp | 3 | ||||
-rw-r--r-- | sdl_gl.cpp | 15 |
2 files changed, 7 insertions, 11 deletions
@@ -33,8 +33,6 @@ #include <SDL.h> #include <SDL_thread.h> -#define MAX(a,b) (((a)<(b)) ? (b) : (a)) -#define MIN(a,b) (((a)>(b)) ? (b) : (a)) class OSystem_SDL : public OSystem { public: @@ -960,7 +958,6 @@ bool OSystem_SDL::poll_event(Event *event) { quit(); } } - } bool OSystem_SDL::set_sound_proc(void *param, SoundProc *proc, byte format) { diff --git a/sdl_gl.cpp b/sdl_gl.cpp index ebdbe6398b..d126111042 100644 --- a/sdl_gl.cpp +++ b/sdl_gl.cpp @@ -21,15 +21,17 @@ */ #include "stdafx.h" -#include "scumm.h" +#include "scummsys.h" +#include "system.h" #include "mididrv.h" -#include "SDL_thread.h" #include "gameDetector.h" #include "scaler.h" +#include "scumm.h" // Only #included for error() and warning() #include "scummvm.xpm" #include <SDL.h> +#include <SDL_thread.h> #ifdef WIN32 /* Use OpenGL 1.1 */ @@ -39,9 +41,6 @@ #include "fb2opengl.h" -#define MAX(a,b) (((a)<(b)) ? (b) : (a)) -#define MIN(a,b) (((a)>(b)) ? (b) : (a)) - class OSystem_SDL : public OSystem { public: // Set colors of the palette @@ -160,7 +159,7 @@ private: Uint32 cd_end_time, cd_stop_time, cd_next_second; struct MousePos { - int16 x,y,w,h; + int16 x, y, w, h; }; byte *_mouse_data; @@ -574,7 +573,7 @@ bool OSystem_SDL::poll_event(Event *event) { break; } - if (b == KBD_CTRL && ev.key.keysym.sym=='z') { + if ((b == KBD_CTRL && ev.key.keysym.sym=='z') || (b == KBD_ALT && ev.key.keysym.sym=='x')) { quit(); break; } @@ -689,7 +688,7 @@ void OSystem_SDL::hotswap_gfx_mode() { unload_gfx_mode(); load_gfx_mode(); - fb2gl_set_palette(0,256); + fb2gl_set_palette(0,256); fb2gl_update(sdl_tmpscreen->pixels,320,200,320,0,_current_shake_pos); /* blit image */ |