mirror of https://github.com/PCSX2/pcsx2.git
Linux: Some cleanup on the Linux headers as followup to r443.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@446 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
parent
72777893ec
commit
1709b2a74f
|
@ -16,7 +16,7 @@
|
|||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
#include "Linux.h"
|
||||
#include "Linux.h"
|
||||
|
||||
GtkWidget *AboutDlg, *about_version , *about_authors, *about_greets;
|
||||
|
||||
|
|
|
@ -21,6 +21,8 @@
|
|||
using namespace std;
|
||||
using namespace R5900;
|
||||
|
||||
bool applychanges = FALSE;
|
||||
|
||||
static void FindComboText(GtkWidget *combo, char plist[255][255], GList *list, char *conf)
|
||||
{
|
||||
if (strlen(conf) > 0) SetActiveComboItem(GTK_COMBO_BOX(combo), plist, list, conf);
|
||||
|
|
|
@ -20,28 +20,9 @@
|
|||
#define __CONFIGDLG_H__
|
||||
|
||||
#include "Linux.h"
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
{
|
||||
#endif
|
||||
|
||||
#include "support.h"
|
||||
#include "callbacks.h"
|
||||
#include "interface.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#include "R3000A.h"
|
||||
#include "IopMem.h"
|
||||
|
||||
|
||||
// Helper Functions
|
||||
void FindPlugins();
|
||||
void OnConf_Gs(GtkMenuItem *menuitem, gpointer user_data);
|
||||
void OnConf_Pads(GtkMenuItem *menuitem, gpointer user_data);
|
||||
void OnConf_Cpu(GtkMenuItem *menuitem, gpointer user_data);
|
||||
void OnConf_Conf(GtkMenuItem *menuitem, gpointer user_data);
|
||||
typedef struct
|
||||
{
|
||||
GtkWidget *Combo;
|
||||
|
@ -66,9 +47,20 @@ _PS2EgetLibType PS2EgetLibType = NULL;
|
|||
_PS2EgetLibVersion2 PS2EgetLibVersion2 = NULL;
|
||||
_PS2EgetLibName PS2EgetLibName = NULL;
|
||||
|
||||
// Helper Functions
|
||||
void FindPlugins();
|
||||
void OnConf_Gs(GtkMenuItem *menuitem, gpointer user_data);
|
||||
void OnConf_Pads(GtkMenuItem *menuitem, gpointer user_data);
|
||||
void OnConf_Cpu(GtkMenuItem *menuitem, gpointer user_data);
|
||||
void OnConf_Conf(GtkMenuItem *menuitem, gpointer user_data);
|
||||
void SetActiveComboItem(GtkComboBox *widget, char plist[255][255], GList *list, char *conf);
|
||||
void SetComboToGList(GtkComboBox *widget, GList *list);
|
||||
static void ConfPlugin(PluginConf confs, char* plugin, const char* name);
|
||||
static void TestPlugin(PluginConf confs, char* plugin, const char* name);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // __CONFIGDLG_H__
|
|
@ -18,6 +18,9 @@
|
|||
|
||||
#include "Linux.h"
|
||||
|
||||
GtkWidget *CpuDlg;
|
||||
GtkWidget *check_eerec, *check_vu0rec, *check_vu1rec;
|
||||
|
||||
void OnCpu_Ok(GtkButton *button, gpointer user_data)
|
||||
{
|
||||
u32 newopts = 0;
|
||||
|
|
|
@ -20,18 +20,6 @@
|
|||
#define __DEBUGDLG_H__
|
||||
|
||||
#include "Linux.h"
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
{
|
||||
#endif
|
||||
|
||||
#include "support.h"
|
||||
#include "callbacks.h"
|
||||
#include "interface.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#include "R3000A.h"
|
||||
#include "IopMem.h"
|
||||
|
||||
|
|
|
@ -67,46 +67,26 @@ extern "C"
|
|||
}
|
||||
#endif
|
||||
|
||||
/* Misc.c */
|
||||
extern void vu0Shutdown();
|
||||
extern void vu1Shutdown();
|
||||
extern void SaveConfig();
|
||||
|
||||
extern bool UseGui;
|
||||
|
||||
extern int efile;
|
||||
extern int g_SaveGSStream;
|
||||
extern int g_ZeroGSOptions;
|
||||
extern void FixCPUState(void);
|
||||
|
||||
extern void InitLanguages();
|
||||
extern char *GetLanguageNext();
|
||||
extern void CloseLanguages();
|
||||
extern void ChangeLanguage(char *lang);
|
||||
extern void StartGui();
|
||||
extern void RunGui();
|
||||
extern int Pcsx2Configure();
|
||||
extern GtkWidget *CpuDlg;
|
||||
|
||||
extern int LoadConfig();
|
||||
extern void SaveConfig();
|
||||
|
||||
extern void init_widgets();
|
||||
extern MemoryAlloc<u8>* g_RecoveryState;
|
||||
extern void SysRestorableReset();
|
||||
extern void SysDetect();
|
||||
void SignalExit(int sig);
|
||||
extern void RunExecute(const char* elf_file, bool use_bios = false);
|
||||
extern void ExecuteCpu();
|
||||
|
||||
extern bool g_ReturnToGui; // set to exit the execution of the emulator and return control to the GUI
|
||||
extern bool g_EmulationInProgress; // Set TRUE if a game is actively running (set to false on reset)
|
||||
extern void SignalExit(int sig);
|
||||
|
||||
typedef struct
|
||||
{
|
||||
char lang[g_MaxPath];
|
||||
} _langs;
|
||||
|
||||
_langs *langs;
|
||||
unsigned int langsMax;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
GS,
|
||||
|
@ -121,16 +101,8 @@ typedef enum
|
|||
} plugin_types;
|
||||
|
||||
extern GtkWidget *MainWindow;
|
||||
extern bool applychanges;
|
||||
extern bool configuringplug;
|
||||
|
||||
GtkWidget *check_eerec, *check_vu0rec, *check_vu1rec;
|
||||
GtkWidget *check_mtgs , *check_cpu_dc;
|
||||
GtkWidget *check_console , *check_patches;
|
||||
GtkWidget *radio_normal_limit, *radio_limit_limit, *radio_fs_limit, *radio_vuskip_limit;
|
||||
|
||||
_langs *langs;
|
||||
unsigned int langsMax;
|
||||
|
||||
char cfgfile[g_MaxPath];
|
||||
|
||||
|
@ -144,24 +116,6 @@ int Config_hacks_backup;
|
|||
#define set_flag(v, flag, value) if (value == TRUE) v |= flag; else v &= flag;
|
||||
#define get_flag(v,flag) ((v & (1 << flag)) != 0)
|
||||
|
||||
/*static __forceinline void print_flags(char *name, u32 num, char *flag_names[16])
|
||||
{
|
||||
int i;
|
||||
|
||||
DevCon::WriteLn("%s:", name);
|
||||
|
||||
if (flag_names != NULL)
|
||||
{
|
||||
for(i=0; i<=15; i++)
|
||||
DevCon::WriteLn("%s %x: %x", params flag_names[i], (1<<i), get_flag(num, i));
|
||||
}
|
||||
else
|
||||
{
|
||||
for(i=0; i<=15; i++)
|
||||
DevCon::WriteLn("%x: %x", params (1<<i), get_flag(num, i));
|
||||
}
|
||||
} */
|
||||
|
||||
char ee_log_names[17][32] =
|
||||
{
|
||||
"Cpu Log",
|
||||
|
|
|
@ -22,12 +22,18 @@ using namespace R5900;
|
|||
|
||||
DIR *dir;
|
||||
GtkWidget *FileSel;
|
||||
GtkWidget *MsgDlg;
|
||||
bool configuringplug = FALSE;
|
||||
const char* g_pRunGSState = NULL;
|
||||
|
||||
int efile = 0;
|
||||
char elfname[g_MaxPath];
|
||||
int Slots[5] = { -1, -1, -1, -1, -1 };
|
||||
|
||||
#ifdef PCSX2_DEVBUILD
|
||||
TESTRUNARGS g_TestRun;
|
||||
#endif
|
||||
|
||||
GtkWidget *MsgDlg;
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
|
@ -222,7 +228,7 @@ int main(int argc, char *argv[])
|
|||
|
||||
SysReset();
|
||||
|
||||
FixCPUState();
|
||||
//FixCPUState();
|
||||
cpuExecuteBios();
|
||||
if (file) strcpy(elfname, file);
|
||||
if (!efile) efile = GetPS2ElfName(elfname);
|
||||
|
@ -359,17 +365,12 @@ void StartGui()
|
|||
gtk_main();
|
||||
}
|
||||
|
||||
void RunGui()
|
||||
{
|
||||
StartGui();
|
||||
}
|
||||
|
||||
void FixCPUState(void)
|
||||
/*void FixCPUState(void)
|
||||
{
|
||||
//Config.sseMXCSR = LinuxsseMXCSR;
|
||||
//Config.sseVUMXCSR = LinuxsseVUMXCSR;
|
||||
SetCPUState(Config.sseMXCSR, Config.sseVUMXCSR);
|
||||
}
|
||||
}*/
|
||||
|
||||
void OnDestroy(GtkObject *object, gpointer user_data) {}
|
||||
|
||||
|
@ -378,6 +379,7 @@ gboolean OnDelete(GtkWidget *widget, GdkEvent *event, gpointer user_data)
|
|||
pcsx2_exit();
|
||||
return (FALSE);
|
||||
}
|
||||
|
||||
int Pcsx2Configure()
|
||||
{
|
||||
if (!UseGui) return 0;
|
||||
|
|
|
@ -21,33 +21,19 @@
|
|||
|
||||
#include "Linux.h"
|
||||
|
||||
extern char* g_pRunGSState;
|
||||
|
||||
void SignalExit(int sig);
|
||||
bool applychanges = FALSE;
|
||||
bool configuringplug = FALSE;
|
||||
extern bool UseGui;
|
||||
extern bool applychanges;
|
||||
|
||||
extern MemoryAlloc<u8>* g_RecoveryState;
|
||||
extern bool g_ReturnToGui; // set to exit the execution of the emulator and return control to the GUI
|
||||
extern bool g_EmulationInProgress; // Set TRUE if a game is actively running (set to false on reset)
|
||||
|
||||
int efile = 0;
|
||||
char elfname[g_MaxPath];
|
||||
int Slots[5] = { -1, -1, -1, -1, -1 };
|
||||
|
||||
GtkWidget *CpuDlg;
|
||||
|
||||
// Functions Callbacks
|
||||
void OnFile_LoadElf(GtkMenuItem *menuitem, gpointer user_data);
|
||||
void OnFile_Exit(GtkMenuItem *menuitem, gpointer user_data);
|
||||
void OnEmu_Run(GtkMenuItem *menuitem, gpointer user_data);
|
||||
void OnEmu_Reset(GtkMenuItem *menuitem, gpointer user_data);
|
||||
void OnEmu_Arguments(GtkMenuItem *menuitem, gpointer user_data);
|
||||
extern void RunExecute(const char* elf_file, bool use_bios = false);
|
||||
void OnLanguage(GtkMenuItem *menuitem, gpointer user_data);
|
||||
void OnHelp_Help();
|
||||
void OnHelp_About(GtkMenuItem *menuitem, gpointer user_data);
|
||||
void ExecuteCpu();
|
||||
extern void ExecuteCpu();
|
||||
|
||||
void InitLanguages();
|
||||
char *GetLanguageNext();
|
||||
void CloseLanguages();
|
||||
|
||||
void StartGui();
|
||||
void pcsx2_exit();
|
||||
|
@ -57,8 +43,6 @@ GtkWidget *CmdLine; //2002-09-28 (Florin)
|
|||
GtkWidget *widgetCmdLine;
|
||||
GtkWidget *LogDlg;
|
||||
|
||||
void init_widgets();
|
||||
|
||||
GtkAccelGroup *AccelGroup;
|
||||
|
||||
const char* phelpmsg =
|
||||
|
|
|
@ -16,16 +16,13 @@
|
|||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
#include "Linux.h"
|
||||
|
||||
#include <sys/mman.h>
|
||||
#include <sys/stat.h>
|
||||
#include "Linux.h"
|
||||
#include "LnxSysExec.h"
|
||||
|
||||
bool UseGui = true;
|
||||
|
||||
MemoryAlloc<u8>* g_RecoveryState = NULL;
|
||||
MemoryAlloc<u8>* g_gsRecoveryState = NULL;
|
||||
const char* g_pRunGSState = NULL;
|
||||
|
||||
bool g_ReturnToGui = false; // set to exit the execution of the emulator and return control to the GUI
|
||||
bool g_EmulationInProgress = false; // Set TRUE if a game is actively running (set to false on reset)
|
||||
|
@ -118,6 +115,10 @@ void ExecuteCpu()
|
|||
}
|
||||
}
|
||||
|
||||
void RunGui()
|
||||
{
|
||||
StartGui();
|
||||
}
|
||||
|
||||
// Runs an ELF image directly (ISO or ELF program or BIN)
|
||||
// Used by Run::FromCD and such
|
||||
|
|
Loading…
Reference in New Issue