aboutsummaryrefslogtreecommitdiff
path: root/backends
diff options
context:
space:
mode:
authorMax Horn2003-07-31 12:33:33 +0000
committerMax Horn2003-07-31 12:33:33 +0000
commit1b52e9f19cec1693dc9331b0d503aff07f507427 (patch)
treeb58aeeb9e9156a9c3b7477c6116da3f78ee07675 /backends
parentf7ee6d2ce10fb215067ee1a32d4cb124aaa881af (diff)
downloadscummvm-rg350-1b52e9f19cec1693dc9331b0d503aff07f507427.tar.gz
scummvm-rg350-1b52e9f19cec1693dc9331b0d503aff07f507427.tar.bz2
scummvm-rg350-1b52e9f19cec1693dc9331b0d503aff07f507427.zip
added new header file backends/intern.h; removed some stuff from common/system.h which is either only of interest to backends or code instantiating a backend (->backends/intern.h); also removed fmopl specific enums (->sound/fmopl.h)
svn-id: r9327
Diffstat (limited to 'backends')
-rw-r--r--backends/gp32/gp32.h1
-rw-r--r--backends/intern.h50
-rw-r--r--backends/morphos/morphos.h1
-rw-r--r--backends/sdl/sdl-common.h1
-rw-r--r--backends/wince/wince.h2
-rw-r--r--backends/x11/x11.cpp9
6 files changed, 59 insertions, 5 deletions
diff --git a/backends/gp32/gp32.h b/backends/gp32/gp32.h
index 61ca9e7a37..b38912ccf2 100644
--- a/backends/gp32/gp32.h
+++ b/backends/gp32/gp32.h
@@ -19,6 +19,7 @@
*/
+#include "backends/intern.h"
#include "common/stdafx.h"
#include "common/scummsys.h"
#include "common/system.h"
diff --git a/backends/intern.h b/backends/intern.h
new file mode 100644
index 0000000000..1b4dae170f
--- /dev/null
+++ b/backends/intern.h
@@ -0,0 +1,50 @@
+/* ScummVM - Scumm Interpreter
+ * Copyright (C) 2001-2003 The ScummVM project
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ *
+ * $Header$
+ *
+ */
+
+#ifndef BACKENDS_INTERN_H
+#define BACKENDS_INTERN_H
+
+#include "common/system.h"
+
+/* Factory functions. This means we don't have to include the headers for
+ * all backends.
+ */
+extern OSystem *OSystem_SDL_create(int gfx_driver, bool full_screen, bool aspect_ratio);
+extern OSystem *OSystem_NULL_create();
+extern OSystem *OSystem_MorphOS_create(int game_id, int gfx_driver, bool full_screen);
+extern OSystem *OSystem_Dreamcast_create();
+extern OSystem *OSystem_WINCE3_create();
+extern OSystem *OSystem_X11_create();
+extern OSystem *OSystem_MAC_create(int gfx_mode, bool full_screen);
+extern OSystem *OSystem_GP32_create(int gfx_mode, bool full_screen); //ph0x
+extern OSystem *OSystem_PALMOS_create(int gfx_mode);
+
+
+#ifdef _WIN32_WCE
+#define SAMPLES_PER_SEC_OLD 11025
+#define SAMPLES_PER_SEC_NEW 22050
+#else
+//#define SAMPLES_PER_SEC 11025
+#define SAMPLES_PER_SEC 22050
+//#define SAMPLES_PER_SEC 44100
+#endif
+
+#endif
diff --git a/backends/morphos/morphos.h b/backends/morphos/morphos.h
index ff4052f7bc..cb0e858528 100644
--- a/backends/morphos/morphos.h
+++ b/backends/morphos/morphos.h
@@ -31,6 +31,7 @@
#include <libraries/cdda.h>
#include <proto/exec.h>
+#include "backends/intern.h"
#include "morphos_scaler.h"
class OSystem_MorphOS : public OSystem
diff --git a/backends/sdl/sdl-common.h b/backends/sdl/sdl-common.h
index 917d641b38..b1024d1f15 100644
--- a/backends/sdl/sdl-common.h
+++ b/backends/sdl/sdl-common.h
@@ -25,6 +25,7 @@
#include "stdafx.h"
#include "scummsys.h"
#include "system.h"
+#include "backends/intern.h"
#include <SDL.h>
#include <SDL_thread.h>
diff --git a/backends/wince/wince.h b/backends/wince/wince.h
index 2bc05abf0e..4f85f6d459 100644
--- a/backends/wince/wince.h
+++ b/backends/wince/wince.h
@@ -20,7 +20,7 @@
*/
#include "stdafx.h"
-#include <assert.h>
+#include "backends/intern.h"
//#include "commctrl.h"
diff --git a/backends/x11/x11.cpp b/backends/x11/x11.cpp
index 026dbeb148..f146f02824 100644
--- a/backends/x11/x11.cpp
+++ b/backends/x11/x11.cpp
@@ -22,6 +22,7 @@
/* The bare pure X11 port done by Lionel 'BBrox' Ulmer */
+#include "backends/intern.h"
#include "common/util.h"
#include "common/engine.h" // Only #included for error() and warning()
@@ -254,13 +255,13 @@ static void *sound_and_music_thread(void *params)
error("Stereo mode not supported !\n");
exit(1);
}
- param = 22050;
+ param = SAMPLES_PER_SEC;
if (ioctl(sound_fd, SNDCTL_DSP_SPEED, &param) == -1) {
perror("Error in the SNDCTL_DSP_SPEED ioctl !\n");
exit(1);
}
- if (param != 22050) {
- error("22050 kHz not supported !\n");
+ if (param != SAMPLES_PER_SEC) {
+ error("%d kHz not supported !\n", SAMPLES_PER_SEC);
exit(1);
}
if (ioctl(sound_fd, SNDCTL_DSP_GETOSPACE, &info) != 0) {
@@ -788,7 +789,7 @@ uint32 OSystem_X11::property(int param, Property *value)
{
switch (param) {
case PROP_GET_SAMPLE_RATE:
- return 22050;
+ return SAMPLES_PER_SEC;
case PROP_GET_FULLSCREEN:
return 0;
}