mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-29 23:01:58 +00:00
GP2X: Commit some cleanup/fudges with a view to collapsing into the GPH backend.
This commit is contained in:
parent
18e35a638d
commit
5661570e4e
@ -18,9 +18,6 @@
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
*
|
||||
* $URL$
|
||||
* $Id$
|
||||
*
|
||||
*/
|
||||
|
||||
#include "common/scummsys.h"
|
||||
@ -28,12 +25,8 @@
|
||||
#if defined(GP2X)
|
||||
|
||||
#include "backends/events/gp2xsdl/gp2xsdl-events.h"
|
||||
#if defined(GP2X)
|
||||
#include "backends/platform/gp2x/gp2x-hw.h"
|
||||
#include "backends/graphics/gp2xsdl/gp2xsdl-graphics.h"
|
||||
#else
|
||||
#include "backends/platform/gp2xwiz/gp2xwiz-hw.h"
|
||||
#endif
|
||||
|
||||
#include "backends/platform/sdl/sdl.h"
|
||||
|
||||
@ -88,7 +81,6 @@ enum {
|
||||
|
||||
GP2XSdlEventSource::GP2XSdlEventSource()
|
||||
: _buttonStateL(false){
|
||||
|
||||
}
|
||||
|
||||
void GP2XSdlEventSource::SDLModToOSystemKeyFlags(SDLMod mod, Common::Event &event) {
|
||||
@ -468,5 +460,4 @@ bool GP2XSdlEventSource::remapKey(SDL_Event &ev, Common::Event &event) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
#endif
|
||||
|
@ -18,9 +18,6 @@
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
*
|
||||
* $URL$
|
||||
* $Id$
|
||||
*
|
||||
*/
|
||||
|
||||
#if !defined(BACKEND_EVENTS_SDL_GP2X_H) && !defined(DISABLE_DEFAULT_EVENTMANAGER)
|
||||
|
@ -26,7 +26,11 @@
|
||||
#ifndef PLATFORM_SDL_GP2X_H
|
||||
#define PLATFORM_SDL_GP2X_H
|
||||
|
||||
#include "backends/base-backend.h"
|
||||
#include "backends/platform/sdl/sdl.h"
|
||||
#include "backends/platform/sdl/posix/posix.h"
|
||||
#include "backends/graphics/gp2xsdl/gp2xsdl-graphics.h"
|
||||
#include "backends/events/gp2xsdl/gp2xsdl-events.h"
|
||||
|
||||
#ifndef PATH_MAX
|
||||
#define PATH_MAX 255
|
||||
@ -34,12 +38,15 @@
|
||||
|
||||
class OSystem_GP2X : public OSystem_POSIX {
|
||||
public:
|
||||
virtual void initBackend();
|
||||
virtual void quit();
|
||||
virtual void addSysArchivesToSearchSet(Common::SearchSet &s, int priority = 0);
|
||||
OSystem_GP2X() {}
|
||||
|
||||
void initBackend();
|
||||
void quit();
|
||||
void addSysArchivesToSearchSet(Common::SearchSet &s, int priority = 0);
|
||||
void initSDL();
|
||||
|
||||
protected:
|
||||
virtual void initSDL();
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@ -18,15 +18,13 @@
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
*
|
||||
* $URL$
|
||||
* $Id$
|
||||
*
|
||||
*/
|
||||
|
||||
#include "backends/platform/gp2x/gp2x-common.h"
|
||||
#include "backends/plugins/posix/posix-provider.h"
|
||||
#include "backends/plugins/sdl/sdl-provider.h"
|
||||
#include "base/main.h"
|
||||
|
||||
#if defined(GP2X)
|
||||
int main(int argc, char *argv[]) {
|
||||
|
||||
// Create our OSystem instance
|
||||
@ -37,7 +35,7 @@ int main(int argc, char *argv[]) {
|
||||
((OSystem_GP2X *)g_system)->init();
|
||||
|
||||
#ifdef DYNAMIC_MODULES
|
||||
PluginManager::instance().addPluginProvider(new POSIXPluginProvider());
|
||||
PluginManager::instance().addPluginProvider(new SDLPluginProvider());
|
||||
#endif
|
||||
|
||||
// Invoke the actual ScummVM main entry point:
|
||||
@ -48,3 +46,5 @@ int main(int argc, char *argv[]) {
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@ -18,9 +18,6 @@
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
*
|
||||
* $URL$
|
||||
* $Id$
|
||||
*
|
||||
*/
|
||||
|
||||
/*
|
||||
@ -31,12 +28,11 @@
|
||||
// Disable symbol overrides so that we can use system headers.
|
||||
#define FORBIDDEN_SYMBOL_ALLOW_ALL
|
||||
|
||||
#include "backends/platform/sdl/sdl-sys.h"
|
||||
#include "backends/platform/gp2x/gp2x-common.h"
|
||||
#include "backends/platform/gp2x/gp2x-hw.h"
|
||||
#include "backends/platform/gp2x/gp2x-mem.h"
|
||||
|
||||
#include "backends/graphics/gp2xsdl/gp2xsdl-graphics.h"
|
||||
#include "backends/events/gp2xsdl/gp2xsdl-events.h"
|
||||
#include "backends/saves/default/default-saves.h"
|
||||
|
||||
#include "common/config-manager.h"
|
||||
@ -143,7 +139,7 @@ void OSystem_GP2X::initBackend() {
|
||||
if (_graphicsManager == 0)
|
||||
_graphicsManager = new GP2XSdlGraphicsManager(_eventSource);
|
||||
|
||||
// Call parent implementation of this method
|
||||
/* Pass to POSIX method to do the heavy lifting */
|
||||
OSystem_POSIX::initBackend();
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user