summaryrefslogtreecommitdiff
path: root/Source
diff options
context:
space:
mode:
authorSoren Jorvang <soren.jorvang@gmail.com>2010-06-06 21:06:58 +0000
committerSoren Jorvang <soren.jorvang@gmail.com>2010-06-06 21:06:58 +0000
commitf4abbdf6b154c8f6cab2a4ac8be04a5e39bead55 (patch)
tree7519e1765985c7e68363064bad6467027bf4369b /Source
parentb20c04aa4553cc04bdc7bec8c2ed97e581c5fc29 (diff)
Fix nowx build.
We really should integrate the nowx functionality into the main build, removing nowx and HAVE_WX checks and turning USE_WX into a variable that defaults to GUI use but can be overridden at the command line. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5630 8ced0084-cf51-0410-be5f-012b33b47a6e
Diffstat (limited to 'Source')
-rw-r--r--Source/Core/InputCommon/Src/WXInputBase.h6
-rw-r--r--Source/Plugins/Plugin_GCPad/Src/Config.cpp5
-rw-r--r--Source/Plugins/Plugin_GCPad/Src/GCPad.cpp8
-rw-r--r--Source/Plugins/Plugin_Wiimote/Src/FillReport.cpp6
-rw-r--r--Source/Plugins/Plugin_Wiimote/Src/main.cpp6
5 files changed, 22 insertions, 9 deletions
diff --git a/Source/Core/InputCommon/Src/WXInputBase.h b/Source/Core/InputCommon/Src/WXInputBase.h
index f69e9a3c17..da0743db47 100644
--- a/Source/Core/InputCommon/Src/WXInputBase.h
+++ b/Source/Core/InputCommon/Src/WXInputBase.h
@@ -18,11 +18,17 @@
#ifndef WXINPUTBASE_H
#define WXINPUTBASE_H
+#include "Common.h"
+#if defined(HAVE_WX) && HAVE_WX
#include <wx/wx.h>
+#endif
namespace InputCommon
{
+#if defined(HAVE_WX) && HAVE_WX
const wxString WXKeyToString(int keycode);
const wxString WXKeymodToString(int modifier);
+#endif
}
#endif
+
diff --git a/Source/Plugins/Plugin_GCPad/Src/Config.cpp b/Source/Plugins/Plugin_GCPad/Src/Config.cpp
index d4ad60ff5b..dfeab270b4 100644
--- a/Source/Plugins/Plugin_GCPad/Src/Config.cpp
+++ b/Source/Plugins/Plugin_GCPad/Src/Config.cpp
@@ -123,7 +123,7 @@ static const int gcDefaultControls[] =
0x00, // L semi-press
0x00, // R semi-press
};
-#else defined(USE_WX) && USE_WX
+#elif defined(USE_WX) && USE_WX
{
'X', // A
'Z', // B
@@ -150,9 +150,10 @@ static const int gcDefaultControls[] =
0, // L semi-press
0, // R semi-press
};
+#else
+ { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 };
#endif
-
Config g_Config;
// Run when created
diff --git a/Source/Plugins/Plugin_GCPad/Src/GCPad.cpp b/Source/Plugins/Plugin_GCPad/Src/GCPad.cpp
index 18cff3ed49..776638542d 100644
--- a/Source/Plugins/Plugin_GCPad/Src/GCPad.cpp
+++ b/Source/Plugins/Plugin_GCPad/Src/GCPad.cpp
@@ -243,15 +243,17 @@ void EmuStateChange(PLUGIN_EMUSTATE newState)
{
}
+#if defined(HAVE_WX) && HAVE_WX
// Hack to use wx key events
-volatile bool wxkeystate[400];
+volatile bool wxkeystate[WXK_SPECIAL20];
+#endif
// Set buttons status from keyboard input. Currently this is done from wxWidgets in the main application.
// --------------
void PAD_Input(u16 _Key, u8 _UpDown)
{
#if defined(__APPLE__) && defined(USE_WX) && USE_WX
- if (_Key < 400)
+ if (_Key < WXK_SPECIAL20)
{
wxkeystate[_Key] = _UpDown;
}
@@ -634,7 +636,7 @@ bool IsKey(int Key)
}
else if (MapKey < 0x1100)
#elif defined (USE_WX) && USE_WX
- if (MapKey < 400) {
+ if (MapKey < WXK_SPECIAL20) {
Ret = wxkeystate[MapKey];
}
else if (MapKey < 0x1100)
diff --git a/Source/Plugins/Plugin_Wiimote/Src/FillReport.cpp b/Source/Plugins/Plugin_Wiimote/Src/FillReport.cpp
index 8e14d4b223..b9f50291b5 100644
--- a/Source/Plugins/Plugin_Wiimote/Src/FillReport.cpp
+++ b/Source/Plugins/Plugin_Wiimote/Src/FillReport.cpp
@@ -34,8 +34,10 @@
extern SWiimoteInitialize g_WiimoteInitialize;
+#if defined(HAVE_WX) && HAVE_WX
// Hack to use wx key events
-extern volatile bool wxkeystate[400];
+extern volatile bool wxkeystate[WXK_SPECIAL20];
+#endif
namespace WiiMoteEmu
{
@@ -323,7 +325,7 @@ bool IsKey(int Key)
}
else if (MapKey < 0x1100)
#elif defined (USE_WX) && USE_WX
- if (MapKey < 400) {
+ if (MapKey < WXK_SPECIAL20) {
Ret = wxkeystate[MapKey];
}
else if (MapKey < 0x1100)
diff --git a/Source/Plugins/Plugin_Wiimote/Src/main.cpp b/Source/Plugins/Plugin_Wiimote/Src/main.cpp
index d836e08791..5a73b36ddd 100644
--- a/Source/Plugins/Plugin_Wiimote/Src/main.cpp
+++ b/Source/Plugins/Plugin_Wiimote/Src/main.cpp
@@ -294,8 +294,10 @@ void EmuStateChange(PLUGIN_EMUSTATE newState)
g_EmulatorState = newState;
}
+#if defined(HAVE_WX) && HAVE_WX
// Hack to use wx key events
-volatile bool wxkeystate[400];
+volatile bool wxkeystate[WXK_SPECIAL20];
+#endif
// Set buttons status from keyboard input. Currently this is done from
// wxWidgets in the main application.
@@ -303,7 +305,7 @@ volatile bool wxkeystate[400];
void Wiimote_Input(u16 _Key, u8 _UpDown)
{
#if defined(__APPLE__) && defined(USE_WX) && USE_WX
- if (_Key < 400)
+ if (_Key < WXK_SPECIAL20)
{
wxkeystate[_Key] = _UpDown;
}