Linux: Get everything compiling again. There is still a nasty crahing bug or two from r675, in particular when using the menus for load and save states rather then keyboard commands. I'll work on fixing that tomorrow, but wanted it to at least compile and run.

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@679 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
arcum42 2009-03-04 20:58:41 +00:00
parent 74db449e88
commit 1492382253
8 changed files with 50 additions and 28 deletions

View File

@ -1,7 +1,7 @@
# -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.
AC_PREREQ([2.63])
//AC_PREREQ([2.63])
AC_INIT([FULL-PACKAGE-NAME], [VERSION], [BUG-REPORT-ADDRESS])
AM_INIT_AUTOMAKE
AC_CONFIG_SRCDIR([BPMDetect.h])

View File

@ -71,6 +71,4 @@ 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);
extern void CheckSlots();
#endif // __CONFIGDLG_H__

View File

@ -139,7 +139,7 @@ int main(int argc, char *argv[])
if (!efile) efile = GetPS2ElfName(elfname);
loadElfFile(elfname);
ExecuteCpu();
//ExecuteCpu();
return 0;
}
@ -211,7 +211,27 @@ void On_Dialog_Cancelled(GtkButton* button, gpointer user_data)
gtk_widget_set_sensitive(MainWindow, TRUE);
gtk_main_quit();
}
void RefreshMenuSlots()
{
GtkWidget *Item;
char str[g_MaxPath], str2[g_MaxPath];
for (int i = 0; i < 5; i++)
{
sprintf(str, "load_slot_%d", i);
sprintf(str2, "save_slot_%d", i);
Item = lookup_widget(MainWindow, str);
if GTK_IS_WIDGET(Item)
gtk_widget_set_sensitive(Item, Slots[i]);
else
Console::Error("No such widget: %s", params str);
Item = lookup_widget(MainWindow, str2);
gtk_widget_set_sensitive(Item, (ElfCRC != 0));
}
}
void StartGui()
{
GtkWidget *Menu;
@ -233,7 +253,7 @@ void StartGui()
gtk_box_pack_start(GTK_BOX(lookup_widget(MainWindow, "status_box")), pStatusBar, TRUE, TRUE, 0);
gtk_widget_show(pStatusBar);
StatusBar_SetMsg( "F1 - save, F2 - next state, Shift+F2 - prev state, F3 - load, F8 - snapshot");
HostGui::SetStatusMsg( "F1 - save, F2 - next state, Shift+F2 - prev state, F3 - load, F8 - snapshot");
// add all the languages
Item = lookup_widget(MainWindow, "GtkMenuItem_Language");
@ -269,7 +289,7 @@ void StartGui()
gtk_widget_destroy(lookup_widget(MainWindow, "GtkMenuItem_Debug"));
#endif
ResetMenuSlots();
RefreshMenuSlots();
gtk_widget_show_all(MainWindow);
gtk_window_activate_focus(GTK_WINDOW(MainWindow));

View File

@ -20,9 +20,11 @@
#define __LNXMAIN_H__
#include "Linux.h"
#include "LnxMain.h"
#include "HostGui.h"
extern bool applychanges;
extern bool Slots[5];
extern bool ParseCommandLine(int argc, char *argv[], char *file);
extern void MemoryCard_Init();
@ -34,6 +36,8 @@ void CloseLanguages();
void StartGui();
void pcsx2_exit();
extern bool SysInit();
extern void SysClose();
GtkWidget *MainWindow, *Status_Box;
GtkWidget *pStatusBar = NULL;

View File

@ -18,12 +18,15 @@
#include "Linux.h"
#include "LnxSysExec.h"
#include "HostGui.h"
bool UseGui = true;
static bool sinit = false;
GtkWidget *FileSel;
bool Slots[5] = { false, false, false, false, false };
void InstallLinuxExceptionHandler()
{
struct sigaction sa;
@ -201,8 +204,9 @@ void OnStates_Load(GtkMenuItem *menuitem, gpointer user_data)
}
sscanf(name, "Slot %d", &i);
if( States_Load(i) )
ExecuteCpu();
//if (States_Load(i)) ExecuteCpu();
States_Load(i);
RefreshMenuSlots();
}
void OnLoadOther_Ok(GtkButton* button, gpointer user_data)
@ -214,8 +218,9 @@ void OnLoadOther_Ok(GtkButton* button, gpointer user_data)
strcpy(str, File);
gtk_widget_destroy(FileSel);
if( States_Load(str) )
ExecuteCpu();
//if (States_Load(str)) ExecuteCpu();
States_Load(str);
RefreshMenuSlots();
}
void OnLoadOther_Cancel(GtkButton* button, gpointer user_data)
@ -429,28 +434,17 @@ namespace HostGui
{
// mirror output to the console!
Console::Status( text.c_str() );
SetStatusMsg( test );
SetStatusMsg( text );
}
void ResetMenuSlots()
{
GtkWidget *Item;
char str[g_MaxPath], str2[g_MaxPath];
for (int i = 0; i < 5; i++)
{
sprintf(str, "load_slot_%d", i);
sprintf(str2, "save_slot_%d", i);
Item = lookup_widget(MainWindow, str);
if GTK_IS_WIDGET(Item)
gtk_widget_set_sensitive(Item, Slots[i]);
else
Console::Error("No such widget: %s", params str);
Item = lookup_widget(MainWindow, str2);
gtk_widget_set_sensitive(Item, (ElfCRC != 0));
Slots[i] = States_isSlotUsed(i);
}
}

View File

@ -32,7 +32,7 @@ void __fastcall ReleaseLinuxExceptionHandler();
#define PCSX2_MEM_PROTECT_END() ReleaseLinuxExceptionHandler()
extern void StartGui();
extern void CheckSlots();
extern void RefreshMenuSlots();
extern void SignalExit(int sig);
extern const char* g_pRunGSState;

View File

@ -314,10 +314,16 @@ void SysClearExecutionCache()
__forceinline void SysUpdate()
{
#ifdef __LINUX__
// Doing things the other way results in no keys functioning under Linux!
HostGui::KeyEvent(PAD1keyEvent());
HostGui::KeyEvent(PAD2keyEvent());
#else
keyEvent* ev1 = PAD1keyEvent();
keyEvent* ev2 = PAD2keyEvent();
HostGui::KeyEvent( (ev1 != NULL) ? ev1 : ev2);
#endif
}
void SysExecute()

View File

@ -19,9 +19,9 @@ BaseblockEx.h iCOP0.h iCore.h iFPU.h iMMI.h iR3000A.h iR5900.h iR5900Arit.h iR59
iR5900LoadStore.h iR5900Move.h iR5900MultDiv.h iR5900Shift.h iVUmicro.h iVUops.h iVUzerorec.h
#ifdef PCSX2_MICROVU
libx86recomp_a_SOURCES += \
microVU.cpp microVU_Alloc.cpp microVU_Compile.cpp microVU_Lower.cpp microVU_Misc.cpp microVU_Upper.cpp aMicroVU.S \
microVU.h microVU_Alloc.h microVU_Misc.h microVU_Tables.h
#libx86recomp_a_SOURCES += \
#microVU.cpp microVU_Alloc.cpp microVU_Compile.cpp microVU_Lower.cpp microVU_Misc.cpp microVU_Upper.cpp aMicroVU.S \
#microVU.h microVU_Alloc.h microVU_Misc.h microVU_Tables.h
#endif
libx86recomp_a_DEPENDENCIES = ix86/libix86.a