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
This commit is contained in:
Max Horn 2002-07-23 10:51:17 +00:00
parent 07966f6ccc
commit c80d11090a
2 changed files with 7 additions and 11 deletions

View file

@ -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) {

View file

@ -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 */