nJoy SDL, linux: fix some warnings and a bug. untested :p

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@2691 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
hrydgard 2009-03-20 17:14:42 +00:00
parent ad76edd157
commit 0489ccd420
3 changed files with 20 additions and 12 deletions

View File

@ -363,7 +363,7 @@ void ConfigBox::ToBlank(bool ToBlank)
{
for(int i = IDB_ANALOG_MAIN_X; i <= IDB_BUTTONHALFPRESS; i++)
#ifndef _WIN32
if(GetButtonText(i, j).ToAscii() == "-1") SetButtonText(i, "", j);
if(!strcmp(GetButtonText(i, j), "-1")) SetButtonText(i, "", j);
#else
if(GetButtonText(i, j) == "-1") SetButtonText(i, "", j);
#endif
@ -381,7 +381,7 @@ void ConfigBox::ToBlank(bool ToBlank)
///////////////////////////////////////////////////////////////////////////////////
// Change settings
// ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
void ConfigBox::SetButtonTextAll(int id, char text[128])
void ConfigBox::SetButtonTextAll(int id, const char *text)
{
for (int i = 0; i < 4; i++)
{
@ -589,7 +589,7 @@ void ConfigBox::UpdateGUI(int _notebookpage)
// Paint the background
// ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
void ConfigBox::OnPaint( wxPaintEvent &event )
void ConfigBox::OnPaint(wxPaintEvent &event)
{
event.Skip();

View File

@ -315,17 +315,24 @@ class ConfigBox : public wxDialog
void CancelClick(wxCommandEvent& event);
void DoSave(bool ChangePad = false, int Slot = -1);
void DoChangeJoystick(); void PadOpen(int Open); void PadClose(int Close);
void DoChangeJoystick();
void PadOpen(int Open);
void PadClose(int Close);
void UpdateGUI(int _notebookpage);
void ChangeSettings(wxCommandEvent& event);
void ComboChange(wxCommandEvent& event);
void OnClose(wxCloseEvent& event);
void CreateGUIControls(); void CreateAdvancedControls(int i);
void CreateGUIControls();
void CreateAdvancedControls(int i);
void SizeWindow();
wxBitmap CreateBitmap(); wxBitmap CreateBitmapDot();
void PadGetStatus(); void Update();
wxBitmap CreateBitmap();
wxBitmap CreateBitmapDot();
void PadGetStatus();
void Update();
void UpdateGUIButtonMapping(int controller);
void SaveButtonMapping(int controller, bool DontChangeId = false, int FromSlot = -1);
@ -342,7 +349,8 @@ class ConfigBox : public wxDialog
void OnPaint(wxPaintEvent &event);
void SetButtonText(int id, char text[128], int Page = -1); void SetButtonTextAll(int id, char text[128]);
void SetButtonText(int id, const char *text, int Page = -1);
void SetButtonTextAll(int id, const char *text);
wxString GetButtonText(int id, int Page = -1);
void OnKeyDown(wxKeyEvent& event);
};

View File

@ -170,7 +170,7 @@ void ConfigBox::SaveButtonMapping(int controller, bool DontChangeId, int FromSlo
// Update the textbox for the buttons
// ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
void ConfigBox::SetButtonText(int id, char text[128], int Page)
void ConfigBox::SetButtonText(int id, const char *text, int Page)
{
// Set controller value
int controller;