wxGui Branch: [Linux] Fixes for various warnings and errors.

git-svn-id: http://pcsx2.googlecode.com/svn/branches/wxgui@1078 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
Jake.Stine 2009-04-27 22:00:56 +00:00
parent 172f933986
commit d9f367f03f
18 changed files with 59 additions and 52 deletions

View File

@ -55,7 +55,13 @@ typedef s32 sptr;
#ifdef HAVE_STDINT_H
#include "stdint.h"
typedef int8_t s8;
// note: char and int8_t are not interchangable types on gcc, because int8_t apparently
// maps to 'signed char' which (due to 1's compliment or something) is its own unique
// type. This creates cross-compiler inconsistencies, in addition to being entirely
// unexpected behavior to any sane programmer, so we typecast s8 to char instead. :)
//typedef int8_t s8;
typedef char s8;
typedef int16_t s16;
typedef int32_t s32;
typedef int64_t s64;

View File

@ -184,6 +184,10 @@ public:
McdSysOptions MemoryCards;
public:
void Load();
void Save();
protected:
void LoadSave( IniInterface& ini );
};

View File

@ -618,7 +618,7 @@ u32 psxHwRead32(u32 add) {
}
// A buffer that stores messages until it gets a /n or the number of chars (g_pbufi) is more then 1023.
s8 g_pbuf[1024];
char g_pbuf[1024];
int g_pbufi;
void psxHwWrite8(u32 add, u8 value) {
if (add >= HW_USB_START && add < HW_USB_END) {

View File

@ -85,10 +85,10 @@ namespace FilenameDefs
return wxGetApp().GetAppName() + wxT(".ini");
}
wxFileName Memcard[2] =
const wxFileName Memcard[2] =
{
wxT("Mcd001.ps2"),
wxT("Mcd002.ps2")
wxFileName( wxT("Mcd001.ps2") ),
wxFileName( wxT("Mcd002.ps2") )
};
};
@ -160,6 +160,19 @@ void AppConfig::LoadSave( IniInterface& ini )
ini.Flush();
}
void AppConfig::Load()
{
// Note: Extra parenthisis resolves "I think this is a function" issues with C++.
IniLoader loader( (IniLoader()) );
LoadSave( loader );
}
void AppConfig::Save()
{
IniSaver saver( (IniSaver()) );
LoadSave( saver );
}
void AppConfig::ConsoleLogOptions::LoadSave( IniInterface& ini )
{
ini.SetPath( wxT("ConsoleLog") );

View File

@ -40,6 +40,8 @@ CheckedStaticBox::CheckedStaticBox( wxWindow* parent, int orientation, const wxS
// Ensure that the right-side of the static group box isn't too cozy:
m_StaticBoxSizer.SetMinSize( ThisToggle.GetSize() + wxSize( 22, 1 ) );
Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( CheckedStaticBox::MainToggle_Click ) );
}
// Adds a checkbox to this group panel's base sizer.
@ -52,9 +54,9 @@ wxCheckBox& CheckedStaticBox::AddCheckBox( const wxString& label, wxWindowID id
//////////////////////////////////////////////////////////////////////////////////////////
//
BEGIN_EVENT_TABLE(CheckedStaticBox, wxPanel)
/*BEGIN_EVENT_TABLE(CheckedStaticBox, wxPanel)
EVT_CHECKBOX(wxID_ANY, MainToggle_Click)
END_EVENT_TABLE()
END_EVENT_TABLE()*/
void CheckedStaticBox::MainToggle_Click( wxCommandEvent& evt )
{

View File

@ -38,7 +38,7 @@ public:
wxCheckBox& AddCheckBox( const wxString& label, wxWindowID id=wxID_ANY );
protected:
DECLARE_EVENT_TABLE();
//DECLARE_EVENT_TABLE();
public:
// Event handler for click events for the main checkbox (default behavior: enables/disables all child controls)

View File

@ -15,7 +15,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include "PrecompiledHeader.h"
#include "Misc.h"
#include "GameFixesDialog.h"
@ -43,15 +43,19 @@ GameFixesDialog::GameFixesDialog( wxWindow* parent, int id ):
AddOkCancel( mainSizer );
SetSizerAndFit( &mainSizer );
Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( GameFixesDialog::FPUCompareHack_Click ) );
Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( GameFixesDialog::TriAce_Click ) );
Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( GameFixesDialog::GodWar_Click ) );
}
/*
BEGIN_EVENT_TABLE(GameFixesDialog, wxDialog)
EVT_CHECKBOX(wxID_ANY, FPUCompareHack_Click)
EVT_CHECKBOX(wxID_ANY, TriAce_Click)
EVT_CHECKBOX(wxID_ANY, GodWar_Click)
END_EVENT_TABLE();
*/
void GameFixesDialog::FPUCompareHack_Click(wxCommandEvent &event)
{

View File

@ -17,7 +17,7 @@
*/
#pragma once
#include <wx/wx.h>
#include <wx/image.h>
@ -28,12 +28,10 @@ namespace Dialogs
class GameFixesDialog: public wxDialogWithHelpers
{
public:
GameFixesDialog(wxWindow* parent, int id);
protected:
DECLARE_EVENT_TABLE();
//DECLARE_EVENT_TABLE();
public:
void FPUCompareHack_Click(wxCommandEvent &event);

View File

@ -90,7 +90,7 @@ LogOptionsDialog::eeLogOptionsPanel::HwPanel::HwPanel( wxWindow* parent ) :
void LogOptionsDialog::eeLogOptionsPanel::OnLogChecked(wxCommandEvent &event)
{
LogChecks checkId = (LogChecks)(int)event.m_callbackUserData;
//LogChecks checkId = (LogChecks)(int)event.m_callbackUserData;
//ToggleLogOption( checkId );
event.Skip();
}

View File

@ -18,9 +18,9 @@
#include "PrecompiledHeader.h"
#include "MainFrame.h"
#include "Dialogs/GameFixesDialog.h"
#include "Dialogs/LogOptionsDialog.h"
#include "Dialogs/AboutBoxDialog.h"
#include "GameFixesDialog.h"
#include "LogOptionsDialog.h"
#include "AboutBoxDialog.h"
#include "Resources/EmbeddedImage.h"
#include "Resources/AppIcon.h"

View File

@ -1,5 +1,5 @@
AUTOMAKE_OPTIONS = foreign
INCLUDES = $(shell pkg-config --cflags gtk+-2.0) -I@srcdir@/../ -I@srcdir@/../../common/include -I@srcdir@/../../3rdparty $(shell wx-config --cppflags)
INCLUDES = $(shell pkg-config --cflags gtk+-2.0) -I@srcdir@/../ -I@srcdir@/../Linux/ -I@srcdir@/../../common/include -I@srcdir@/../../3rdparty $(shell wx-config --cppflags)
bin_PROGRAMS = pcsx2
@ -7,8 +7,8 @@ bin_PROGRAMS = pcsx2
pcsx2_SOURCES = \
CheckedStaticBox.cpp ConsoleLogger.cpp MainFrame.cpp wxHelpers.cpp AppConfig.cpp main.cpp \
App.h CheckedStaticBox.h MainFrame.h wxHelpers.h \
Dialogs/AboutBoxDialog.cpp Dialogs/GameFixesDialog.cpp Dialogs/LogOptionsDialog.cpp \
Dialogs/AboutBoxDialog.h Dialogs/GameFixesDialog.h Dialogs/LogOptionsDialog.h ../Linux/memzero.h
AboutBoxDialog.cpp GameFixesDialog.cpp LogOptionsDialog.cpp \
AboutBoxDialog.h GameFixesDialog.h LogOptionsDialog.h
pcsx2_LDFLAGS =

View File

@ -122,7 +122,7 @@ bool Pcsx2App::OnInit()
wxConfigBase::Get()->SetRecordDefaults();
}
g_Conf.LoadSave( IniLoader() );
g_Conf.Load();
m_Bitmap_Logo = new wxBitmap( EmbeddedImage<png_BackgroundLogo>().GetImage() );
@ -135,7 +135,7 @@ bool Pcsx2App::OnInit()
int Pcsx2App::OnExit()
{
g_Conf.LoadSave( IniSaver() );
g_Conf.Save();
return wxApp::OnExit();
}

View File

@ -193,7 +193,7 @@ namespace PathDefs
namespace FilenameDefs
{
extern wxFileName GetConfig();
extern wxFileName Memcard[2];
extern const wxFileName Memcard[2];
};
#endif

View File

@ -92,6 +92,7 @@ typedef int BOOL;
// need a full recompile anyway, when modified (etc)
#include "zlib/zlib.h"
#include "PS2Etypes.h"
#include "Paths.h"
#include "Config.h"

View File

@ -2907,27 +2907,6 @@
<File
RelativePath="..\..\PathUtils.cpp"
>
<FileConfiguration
Name="Debug|Win32"
>
<Tool
Name="VCCLCompilerTool"
/>
</FileConfiguration>
<FileConfiguration
Name="Devel|Win32"
>
<Tool
Name="VCCLCompilerTool"
/>
</FileConfiguration>
<FileConfiguration
Name="Release|Win32"
>
<Tool
Name="VCCLCompilerTool"
/>
</FileConfiguration>
</File>
<File
RelativePath="..\..\Plugins.cpp"
@ -3330,27 +3309,27 @@
Name="Dialogs"
>
<File
RelativePath="..\..\NewGUI\Dialogs\AboutBoxDialog.cpp"
RelativePath="..\..\NewGUI\AboutBoxDialog.cpp"
>
</File>
<File
RelativePath="..\..\NewGUI\Dialogs\AboutBoxDialog.h"
RelativePath="..\..\NewGUI\AboutBoxDialog.h"
>
</File>
<File
RelativePath="..\..\NewGUI\Dialogs\GameFixesDialog.cpp"
RelativePath="..\..\NewGUI\GameFixesDialog.cpp"
>
</File>
<File
RelativePath="..\..\NewGUI\Dialogs\GameFixesDialog.h"
RelativePath="..\..\NewGUI\GameFixesDialog.h"
>
</File>
<File
RelativePath="..\..\NewGUI\Dialogs\LogOptionsDialog.cpp"
RelativePath="..\..\NewGUI\LogOptionsDialog.cpp"
>
</File>
<File
RelativePath="..\..\NewGUI\Dialogs\LogOptionsDialog.h"
RelativePath="..\..\NewGUI\LogOptionsDialog.h"
>
</File>
</Filter>