Fixed the joystick mapping getting converted to unicode in the conf file when they should not have been.
This commit is contained in:
parent
56a42ec50f
commit
18d429c2c0
|
@ -33,7 +33,7 @@ endif(ENABLE_OPENAL)
|
|||
# adv is for wxAboutBox
|
||||
# xml, html is for xrc
|
||||
SET( wxWidgets_USE_LIBS xrc xml html adv gl net core base )
|
||||
list(APPEND wxWidgets_CONFIG_OPTIONS --version=3.0)
|
||||
#list(APPEND wxWidgets_CONFIG_OPTIONS --version=2.8)
|
||||
FIND_PACKAGE ( wxWidgets REQUIRED )
|
||||
#EXECUTE_PROCESS(COMMAND sh "${wxWidgets_CONFIG_EXECUTABLE}" --cxxflags)
|
||||
INCLUDE( ${wxWidgets_USE_FILE} )
|
||||
|
@ -179,5 +179,5 @@ if(APPLE)
|
|||
SET(MACOSX_BUNDLE_ICON_FILE vbam.icns)
|
||||
SET_SOURCE_FILES_PROPERTIES(${VBAM_ICON} PROPERTIES MACOSX_PACKAGE_LOCATION Resources)
|
||||
endif(APPLE)
|
||||
|
||||
|
||||
SET(WX_EXE_NAME wxvbam${CMAKE_EXECUTABLE_SUFFIX})
|
||||
|
|
|
@ -1743,7 +1743,7 @@ public:
|
|||
|
||||
for (int i = 0; i < NUM_KEYS; i++)
|
||||
{
|
||||
wxJoyKeyTextCtrl* tc = XRCCTRL_D(*p, wxString::FromUTF8(joynames[i]), wxJoyKeyTextCtrl);
|
||||
wxJoyKeyTextCtrl* tc = XRCCTRL_D(*p, joynames[i], wxJoyKeyTextCtrl);
|
||||
|
||||
if (clear)
|
||||
tc->SetValue(wxEmptyString);
|
||||
|
@ -3632,7 +3632,7 @@ bool MainFrame::BindControls()
|
|||
|
||||
for (int j = 0; j < NUM_KEYS; j++)
|
||||
{
|
||||
wxJoyKeyTextCtrl* tc = XRCCTRL_D(*w, wxString::FromUTF8(joynames[j]), wxJoyKeyTextCtrl);
|
||||
wxJoyKeyTextCtrl* tc = XRCCTRL_D(*w, joynames[j], wxJoyKeyTextCtrl);
|
||||
CheckThrowXRCError(tc, ToString(joynames[j]));
|
||||
wxWindow* p = tc->GetParent();
|
||||
|
||||
|
|
|
@ -102,14 +102,14 @@ const int num_def_accels = sizeof(default_accels) / sizeof(default_accels[0]);
|
|||
|
||||
// Note: this must match GUI widget names or GUI won't work
|
||||
// This table's order determines tab order as well
|
||||
const char* const joynames[NUM_KEYS] =
|
||||
const wxChar* const joynames[NUM_KEYS] =
|
||||
{
|
||||
("Up"), ("Down"), ("Left"), ("Right"),
|
||||
("A"), ("B"), ("L"), ("R"),
|
||||
("Select"), ("Start"),
|
||||
("MotionUp"), ("MotionDown"), ("MotionLeft"), ("MotionRight"),
|
||||
("MotionIn"), ("MotionOut"), ("AutoA"), ("AutoB"),
|
||||
("Speed"), ("Capture"), ("GS")
|
||||
wxT("Up"), wxT("Down"), wxT("Left"), wxT("Right"),
|
||||
wxT("A"), wxT("B"), wxT("L"), wxT("R"),
|
||||
wxT("Select"), wxT("Start"),
|
||||
wxT("MotionUp"), wxT("MotionDown"), wxT("MotionLeft"), wxT("MotionRight"),
|
||||
wxT("MotionIn"), wxT("MotionOut"), wxT("AutoA"), wxT("AutoB"),
|
||||
wxT("Speed"), wxT("Capture"), wxT("GS")
|
||||
};
|
||||
|
||||
wxJoyKeyBinding defkeys[NUM_KEYS * 2] =
|
||||
|
@ -388,7 +388,7 @@ void load_opts()
|
|||
int i;
|
||||
|
||||
for (i = 0; i < NUM_KEYS; i++)
|
||||
if (e == wxString::FromUTF8(joynames[i]))
|
||||
if (e == joynames[i])
|
||||
break;
|
||||
|
||||
if (i == NUM_KEYS)
|
||||
|
@ -949,7 +949,7 @@ bool opt_set(const wxChar* name, const wxChar* val)
|
|||
int kno;
|
||||
|
||||
for (kno = 0; kno < NUM_KEYS; kno++)
|
||||
if (!wxStrcmp(wxString::FromUTF8(joynames[kno]), slat + 3))
|
||||
if (!wxStrcmp(joynames[kno], slat + 3))
|
||||
break;
|
||||
|
||||
if (kno == NUM_KEYS)
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
#define WX_OPTS_H
|
||||
|
||||
#define NUM_KEYS 21
|
||||
extern const char* const joynames[NUM_KEYS];
|
||||
extern const wxChar* const joynames[NUM_KEYS];
|
||||
extern wxJoyKeyBinding defkeys[NUM_KEYS * 2]; // keyboard + joystick defaults
|
||||
|
||||
extern struct opts_t
|
||||
|
|
Loading…
Reference in New Issue