moving around some event handler code

creating inputcommon


git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@1766 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
nakeee 2009-01-04 19:54:56 +00:00
parent b7f1e937bb
commit 90560511c9
11 changed files with 33 additions and 23 deletions

View File

@ -51,6 +51,7 @@ include_paths = [
'../../../../Externals/LZO',
'../../../../Externals/WiiUseSrc/Src',
'../../../Core/VideoCommon/Src',
'../../../Core/InputCommon/Src',
]
dirs = [
@ -61,6 +62,7 @@ dirs = [
'Source/Core/Core/Src',
'Source/Core/DiscIO/Src',
'Source/Core/VideoCommon/Src',
'Source/Core/InputCommon/Src',
'Source/Plugins/Plugin_VideoOGL/Src',
'Source/Plugins/Plugin_DSP_HLE/Src',
'Source/Plugins/Plugin_DSP_LLE/Src',
@ -311,9 +313,9 @@ env['libs_dir'] = env['prefix'] + 'Libs/'
#TODO where should this go?
env['data_dir'] = env['prefix']
env['RPATH'] += env['libs_dir']
env['RPATH'].append(env['libs_dir'])
env['LIBPATH'] += [ env['libs_dir'] ]
env['LIBPATH'].append(env['libs_dir'])
rev = utils.GenerateRevFile(env['flavor'],

View File

@ -56,7 +56,7 @@
#include "MemTools.h"
#include "Host.h"
#include "LogManager.h"
#include "EventHandler.h"
#include "InputCommon.h"
#include "State.h"
@ -68,7 +68,6 @@
// glXMakeCurrent/ wglMakeCurrent takes a context and makes it current on the current thread.
// So it's fine to init ogl on one thread, and then make it current and start blasting on another.
EventHandler *eventHandler = NULL;;
namespace Core
{
@ -124,11 +123,8 @@ bool Init(const SCoreStartupParameter _CoreParameter)
g_CoreStartupParameter = _CoreParameter;
#if defined GLTEST && GLTEST
// init the event handler
eventHandler = new EventHandler();
#endif
InputCommon::Init();
// start the thread again
_dbg_assert_(HLE, g_pThread == NULL);
@ -285,9 +281,9 @@ THREAD_RETURN EmuThread(void *pArg)
PluginVideo::Video_Initialize(&VideoInitialize);
// Under linux, this is an X11 Display, not an HWND!
g_pWindowHandle = (HWND)VideoInitialize.pWindowHandle;
Callback_PeekMessages = VideoInitialize.pPeekMessages;
g_pUpdateFPSDisplay = VideoInitialize.pUpdateFPSDisplay;
g_pWindowHandle = (HWND)VideoInitialize.pWindowHandle;
Callback_PeekMessages = VideoInitialize.pPeekMessages;
g_pUpdateFPSDisplay = VideoInitialize.pUpdateFPSDisplay;
// Load and init DSPPlugin
DSPInitialize dspInit;
@ -401,9 +397,7 @@ THREAD_RETURN EmuThread(void *pArg)
PluginVideo::Video_Shutdown();
PluginVideo::UnloadPlugin();
if (eventHandler)
delete eventHandler;
InputCommon::Shutdown();
HW::Shutdown();
LOG(MASTER_LOG, "EmuThread exited");

View File

@ -15,7 +15,6 @@ files = ["Console.cpp",
"State.cpp",
"Tracer.cpp",
"VolumeHandler.cpp",
"EventHandler.cpp",
"Boot/Boot.cpp",
"Boot/Boot_BIOSEmu.cpp",
"Boot/Boot_DOL.cpp",
@ -120,9 +119,10 @@ else:
]
libs = [
'bdisasm'
'bdisasm',
'inputcommon',
]
env_core = env.Clone();
env_core.Append(CXXFLAGS = [ '-fPIC' ])
env_core.StaticLibrary("core", files, LIBS=libs)
env_core.StaticLibrary('core', files, LIBS=libs)

View File

@ -12,7 +12,8 @@ files = [
]
libs = [
'core', 'minilzo', 'discio', 'bdisasm', 'videocommon', 'common', 'z'
'core', 'minilzo', 'discio', 'bdisasm', 'videocommon', 'inputcommon',
'common', 'z'
]
if wxenv['HAVE_WX']:

View File

@ -46,6 +46,4 @@ public:
static void SFKeyToString(sf::Key::Code keycode, char *keyStr);
};
extern EventHandler *eventHandler;
#endif

View File

@ -0,0 +1,12 @@
# -*- python -*-
Import('env')
files = [
'EventHandler.cpp',
'InputCommon.cpp',
]
env_inputcommon = env.Clone()
env_inputcommon.Append(CXXFLAGS = [ '-fPIC' ])
env_inputcommon.StaticLibrary("inputcommon", files)

View File

@ -82,6 +82,9 @@ const SPADStatus& PlayRecord()
return(recordBuffer[count++]);
}
// TODO: fix this dirty hack to stop missing symbols
void __Log(int log, const char *format, ...) {}
void __Logv(int log, int v, const char *format, ...) {}
bool registerKey(int nPad, int id, sf::Key::Code code, int mods) {

View File

@ -18,7 +18,7 @@
#ifndef __PADSIMPLE_H__
#define __PADSIMPLE_H__
#include "EventHandler.h"
#include "InputCommon.h"
#define EPAD_CONFIG_FILE "epad.ini"
// Controls
enum

View File

@ -19,6 +19,6 @@ if padeenv['HAVE_WX']:
"GUI/ConfigDlg.cpp",
]
padeenv.Append(LIBS = [ 'core', 'common' ])
padeenv.Append(LIBS = [ 'inputcommon', 'common' ])
padeenv.SharedLibrary(env['plugin_dir']+name, files)