A few minor changes to the Linux port, and a minor ZeroGS bugfix.

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@523 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
arcum42 2009-02-18 12:51:36 +00:00
parent 33d5c66ac7
commit ec3a17d9cc
11 changed files with 139 additions and 38 deletions

View File

@ -8,15 +8,17 @@
#Normal #Normal
export PCSX2OPTIONS="--enable-sse3 --enable-sse4 --prefix `pwd`" export PCSX2OPTIONS="--enable-sse3 --enable-sse4 --prefix `pwd`"
#Optimized, but a devbuild #Optimized, but a devbuild
#export PCSX2OPTIONS="--enable-sse3 --enable-sse4 --enable-devbuild --prefix `pwd`" #export PCSX2OPTIONS="--enable-sse3 --enable-sse4 --enable-devbuild --prefix `pwd`"
#Debug / Devbuild version #Debug / Devbuild version
#export PCSX2OPTIONS="--enable-debug --enable-devbuild --enable-sse3 --prefix `pwd`" #export PCSX2OPTIONS="--enable-debug --enable-devbuild --enable-sse3 --prefix `pwd`"
# Make sure we have plugins, and bring the normal plugins in. #ZeroGS Normal mode
#sh fetch.sh export ZEROGSOPTIONS="--enable-sse2"
#ZeroGS Debug mode
#export ZEROGSOPTIONS="--enable-debug --enable-devbuild --enable-sse2"
option=$@ option=$@
export PCSX2PLUGINS="`pwd`/bin/plugins" export PCSX2PLUGINS="`pwd`/bin/plugins"

View File

@ -59,7 +59,7 @@ void OnCpu_Ok(GtkButton *button, gpointer user_data)
if (CHECK_MULTIGS) if (CHECK_MULTIGS)
Console::Notice("MTGS mode disabled.\n\tEnjoy the fruits of single-threaded simpicity."); Console::Notice("MTGS mode disabled.\n\tEnjoy the fruits of single-threaded simpicity.");
else else
Console::Notice("MTGS mode enabled.\n\tWelcome to multi-threaded awesomeness. And random crashes."); Console::Notice("MTGS mode enabled.\n\tWelcome to multi-threaded awesomeness.");
} }
Config.Options = newopts; Config.Options = newopts;

View File

@ -64,11 +64,11 @@ int main(int argc, char *argv[])
#endif #endif
// make gtk thread safe if using MTGS // make gtk thread safe if using MTGS
if (CHECK_MULTIGS) /*if (CHECK_MULTIGS)
{ {*/
g_thread_init(NULL); g_thread_init(NULL);
gdk_threads_init(); gdk_threads_init();
} /*}*/
if (UseGui) if (UseGui)
{ {
@ -256,14 +256,16 @@ void StartGui()
// check the appropriate menu items // check the appropriate menu items
gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(lookup_widget(MainWindow, "enable_console1")), Config.PsxOut); gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(lookup_widget(MainWindow, "enable_console1")), Config.PsxOut);
gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(lookup_widget(MainWindow, "enable_patches1")), Config.Patch); gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(lookup_widget(MainWindow, "enable_patches1")), Config.Patch);
gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(lookup_widget(MainWindow, "print_cdvd_info1")), Config.cdvdPrint);
// disable anything not implemented or not working properly. // disable anything not implemented or not working properly.
gtk_widget_set_sensitive(GTK_WIDGET(lookup_widget(MainWindow, "patch_browser1")), FALSE); gtk_widget_set_sensitive(GTK_WIDGET(lookup_widget(MainWindow, "patch_browser1")), FALSE);
gtk_widget_set_sensitive(GTK_WIDGET(lookup_widget(MainWindow, "patch_finder2")), FALSE); gtk_widget_set_sensitive(GTK_WIDGET(lookup_widget(MainWindow, "patch_finder2")), FALSE);
gtk_widget_set_sensitive(GTK_WIDGET(lookup_widget(MainWindow, "GtkMenuItem_EnterDebugger")), FALSE); gtk_widget_set_sensitive(GTK_WIDGET(lookup_widget(MainWindow, "GtkMenuItem_EnterDebugger")), FALSE);
//gtk_widget_set_sensitive(GTK_WIDGET(lookup_widget(MainWindow, "GtkMenuItem_Memcards")), FALSE);
#ifndef PCSX2_DEVBUILD #ifndef PCSX2_DEVBUILD
gtk_widget_set_sensitive(GTK_WIDGET(lookup_widget(MainWindow, "GtkMenuItem_Logging")), FALSE); /*gtk_widget_set_sensitive(GTK_WIDGET(lookup_widget(MainWindow, "GtkMenuItem_Logging")), FALSE);
gtk_widget_set_sensitive(GTK_WIDGET(lookup_widget(MainWindow, "GtkMenuItem_Arguments")), FALSE);*/
gtk_widget_destroy(lookup_widget(MainWindow, "GtkMenuItem_Debug"));
#endif #endif
CheckSlots(); CheckSlots();
@ -542,3 +544,8 @@ void on_enable_patches1_activate(GtkMenuItem *menuitem, gpointer user_data)
SaveConfig(); SaveConfig();
} }
void OnPrintCdvdInfo(GtkMenuItem *menuitem, gpointer user_data)
{
Config.cdvdPrint = (int)gtk_check_menu_item_get_active((GtkCheckMenuItem*)menuitem);
SaveConfig();
}

View File

@ -72,6 +72,7 @@ int LoadConfig()
Config.Lang[0] = 0; Config.Lang[0] = 0;
GetValue("Lang", Config.Lang); GetValue("Lang", Config.Lang);
GetValuel("Ps2Out", Config.PsxOut); GetValuel("Ps2Out", Config.PsxOut);
GetValuel("cdvdPrint", Config.cdvdPrint);
GetValuel("ThPriority", Config.ThPriority); GetValuel("ThPriority", Config.ThPriority);
GetValue("PluginsDir", Config.PluginsDir); GetValue("PluginsDir", Config.PluginsDir);
GetValue("BiosDir", Config.BiosDir); GetValue("BiosDir", Config.BiosDir);
@ -137,6 +138,7 @@ void SaveConfig()
SetValue("PluginsDir", Config.PluginsDir); SetValue("PluginsDir", Config.PluginsDir);
SetValue("BiosDir", Config.BiosDir); SetValue("BiosDir", Config.BiosDir);
SetValuel("Ps2Out", Config.PsxOut); SetValuel("Ps2Out", Config.PsxOut);
SetValuel("cdvdPrint", Config.cdvdPrint);
SetValuel("ThPriority", Config.ThPriority); SetValuel("ThPriority", Config.ThPriority);
SetValue("Mcd1", Config.Mcd1); SetValue("Mcd1", Config.Mcd1);
SetValue("Mcd2", Config.Mcd2); SetValue("Mcd2", Config.Mcd2);

View File

@ -266,10 +266,6 @@ void
OnEmu_Reset (GtkMenuItem *menuitem, OnEmu_Reset (GtkMenuItem *menuitem,
gpointer user_data); gpointer user_data);
void
OnEmu_Arguments (GtkMenuItem *menuitem,
gpointer user_data);
void void
OnConf_Conf (GtkMenuItem *menuitem, OnConf_Conf (GtkMenuItem *menuitem,
gpointer user_data); gpointer user_data);
@ -338,6 +334,10 @@ void
on_enable_patches1_activate (GtkMenuItem *menuitem, on_enable_patches1_activate (GtkMenuItem *menuitem,
gpointer user_data); gpointer user_data);
void
OnPrintCdvdInfo (GtkMenuItem *menuitem,
gpointer user_data);
void void
OnDebug_Debugger (GtkMenuItem *menuitem, OnDebug_Debugger (GtkMenuItem *menuitem,
gpointer user_data); gpointer user_data);
@ -346,6 +346,10 @@ void
OnDebug_Logging (GtkMenuItem *menuitem, OnDebug_Logging (GtkMenuItem *menuitem,
gpointer user_data); gpointer user_data);
void
OnEmu_Arguments (GtkMenuItem *menuitem,
gpointer user_data);
void void
OnHelp_About (GtkMenuItem *menuitem, OnHelp_About (GtkMenuItem *menuitem,
gpointer user_data); gpointer user_data);

View File

@ -2420,7 +2420,6 @@ create_MainWindow (void)
GtkWidget *GtkMenuItem_Emulator_menu; GtkWidget *GtkMenuItem_Emulator_menu;
GtkWidget *GtkMenuItem_Run; GtkWidget *GtkMenuItem_Run;
GtkWidget *GtkMenuItem_Reset; GtkWidget *GtkMenuItem_Reset;
GtkWidget *GtkMenuItem_Arguments;
GtkWidget *GtkMenuItem_Configuration; GtkWidget *GtkMenuItem_Configuration;
GtkWidget *GtkMenuItem_Configuration_menu; GtkWidget *GtkMenuItem_Configuration_menu;
GtkWidget *GtkMenuItem_PluginsBios; GtkWidget *GtkMenuItem_PluginsBios;
@ -2446,10 +2445,13 @@ create_MainWindow (void)
GtkWidget *separator7; GtkWidget *separator7;
GtkWidget *enable_console1; GtkWidget *enable_console1;
GtkWidget *enable_patches1; GtkWidget *enable_patches1;
GtkWidget *print_cdvd_info1;
GtkWidget *GtkMenuItem_Debug; GtkWidget *GtkMenuItem_Debug;
GtkWidget *GtkMenuItem_Debug_menu; GtkWidget *GtkMenuItem_Debug_menu;
GtkWidget *GtkMenuItem_EnterDebugger; GtkWidget *GtkMenuItem_EnterDebugger;
GtkWidget *GtkMenuItem_Logging; GtkWidget *GtkMenuItem_Logging;
GtkWidget *separator8;
GtkWidget *GtkMenuItem_Arguments;
GtkWidget *GtkMenuItem_Help; GtkWidget *GtkMenuItem_Help;
GtkWidget *GtkMenuItem_Help_menu; GtkWidget *GtkMenuItem_Help_menu;
GtkWidget *GtkMenuItem_About; GtkWidget *GtkMenuItem_About;
@ -2576,10 +2578,6 @@ create_MainWindow (void)
gtk_widget_show (GtkMenuItem_Reset); gtk_widget_show (GtkMenuItem_Reset);
gtk_container_add (GTK_CONTAINER (GtkMenuItem_Emulator_menu), GtkMenuItem_Reset); gtk_container_add (GTK_CONTAINER (GtkMenuItem_Emulator_menu), GtkMenuItem_Reset);
GtkMenuItem_Arguments = gtk_menu_item_new_with_mnemonic (_("_Arguments"));
gtk_widget_show (GtkMenuItem_Arguments);
gtk_container_add (GTK_CONTAINER (GtkMenuItem_Emulator_menu), GtkMenuItem_Arguments);
GtkMenuItem_Configuration = gtk_menu_item_new_with_mnemonic (_("_Config")); GtkMenuItem_Configuration = gtk_menu_item_new_with_mnemonic (_("_Config"));
gtk_widget_show (GtkMenuItem_Configuration); gtk_widget_show (GtkMenuItem_Configuration);
gtk_container_add (GTK_CONTAINER (GtkMenuBar_Menu), GtkMenuItem_Configuration); gtk_container_add (GTK_CONTAINER (GtkMenuBar_Menu), GtkMenuItem_Configuration);
@ -2681,6 +2679,10 @@ create_MainWindow (void)
gtk_widget_show (enable_patches1); gtk_widget_show (enable_patches1);
gtk_container_add (GTK_CONTAINER (misc1_menu), enable_patches1); gtk_container_add (GTK_CONTAINER (misc1_menu), enable_patches1);
print_cdvd_info1 = gtk_check_menu_item_new_with_mnemonic (_("Print CDVD Info"));
gtk_widget_show (print_cdvd_info1);
gtk_container_add (GTK_CONTAINER (misc1_menu), print_cdvd_info1);
GtkMenuItem_Debug = gtk_menu_item_new_with_mnemonic (_("_Debug")); GtkMenuItem_Debug = gtk_menu_item_new_with_mnemonic (_("_Debug"));
gtk_widget_show (GtkMenuItem_Debug); gtk_widget_show (GtkMenuItem_Debug);
gtk_container_add (GTK_CONTAINER (GtkMenuBar_Menu), GtkMenuItem_Debug); gtk_container_add (GTK_CONTAINER (GtkMenuBar_Menu), GtkMenuItem_Debug);
@ -2696,6 +2698,15 @@ create_MainWindow (void)
gtk_widget_show (GtkMenuItem_Logging); gtk_widget_show (GtkMenuItem_Logging);
gtk_container_add (GTK_CONTAINER (GtkMenuItem_Debug_menu), GtkMenuItem_Logging); gtk_container_add (GTK_CONTAINER (GtkMenuItem_Debug_menu), GtkMenuItem_Logging);
separator8 = gtk_separator_menu_item_new ();
gtk_widget_show (separator8);
gtk_container_add (GTK_CONTAINER (GtkMenuItem_Debug_menu), separator8);
gtk_widget_set_sensitive (separator8, FALSE);
GtkMenuItem_Arguments = gtk_menu_item_new_with_mnemonic (_("_Arguments"));
gtk_widget_show (GtkMenuItem_Arguments);
gtk_container_add (GTK_CONTAINER (GtkMenuItem_Debug_menu), GtkMenuItem_Arguments);
GtkMenuItem_Help = gtk_menu_item_new_with_mnemonic (_("_Help")); GtkMenuItem_Help = gtk_menu_item_new_with_mnemonic (_("_Help"));
gtk_widget_show (GtkMenuItem_Help); gtk_widget_show (GtkMenuItem_Help);
gtk_container_add (GTK_CONTAINER (GtkMenuBar_Menu), GtkMenuItem_Help); gtk_container_add (GTK_CONTAINER (GtkMenuBar_Menu), GtkMenuItem_Help);
@ -2772,9 +2783,6 @@ create_MainWindow (void)
g_signal_connect ((gpointer) GtkMenuItem_Reset, "activate", g_signal_connect ((gpointer) GtkMenuItem_Reset, "activate",
G_CALLBACK (OnEmu_Reset), G_CALLBACK (OnEmu_Reset),
NULL); NULL);
g_signal_connect ((gpointer) GtkMenuItem_Arguments, "activate",
G_CALLBACK (OnEmu_Arguments),
NULL);
g_signal_connect ((gpointer) GtkMenuItem_PluginsBios, "activate", g_signal_connect ((gpointer) GtkMenuItem_PluginsBios, "activate",
G_CALLBACK (OnConf_Conf), G_CALLBACK (OnConf_Conf),
NULL); NULL);
@ -2826,12 +2834,18 @@ create_MainWindow (void)
g_signal_connect ((gpointer) enable_patches1, "activate", g_signal_connect ((gpointer) enable_patches1, "activate",
G_CALLBACK (on_enable_patches1_activate), G_CALLBACK (on_enable_patches1_activate),
NULL); NULL);
g_signal_connect ((gpointer) print_cdvd_info1, "activate",
G_CALLBACK (OnPrintCdvdInfo),
NULL);
g_signal_connect ((gpointer) GtkMenuItem_EnterDebugger, "activate", g_signal_connect ((gpointer) GtkMenuItem_EnterDebugger, "activate",
G_CALLBACK (OnDebug_Debugger), G_CALLBACK (OnDebug_Debugger),
NULL); NULL);
g_signal_connect ((gpointer) GtkMenuItem_Logging, "activate", g_signal_connect ((gpointer) GtkMenuItem_Logging, "activate",
G_CALLBACK (OnDebug_Logging), G_CALLBACK (OnDebug_Logging),
NULL); NULL);
g_signal_connect ((gpointer) GtkMenuItem_Arguments, "activate",
G_CALLBACK (OnEmu_Arguments),
NULL);
g_signal_connect ((gpointer) GtkMenuItem_About, "activate", g_signal_connect ((gpointer) GtkMenuItem_About, "activate",
G_CALLBACK (OnHelp_About), G_CALLBACK (OnHelp_About),
NULL); NULL);
@ -2868,7 +2882,6 @@ create_MainWindow (void)
GLADE_HOOKUP_OBJECT (MainWindow, GtkMenuItem_Emulator_menu, "GtkMenuItem_Emulator_menu"); GLADE_HOOKUP_OBJECT (MainWindow, GtkMenuItem_Emulator_menu, "GtkMenuItem_Emulator_menu");
GLADE_HOOKUP_OBJECT (MainWindow, GtkMenuItem_Run, "GtkMenuItem_Run"); GLADE_HOOKUP_OBJECT (MainWindow, GtkMenuItem_Run, "GtkMenuItem_Run");
GLADE_HOOKUP_OBJECT (MainWindow, GtkMenuItem_Reset, "GtkMenuItem_Reset"); GLADE_HOOKUP_OBJECT (MainWindow, GtkMenuItem_Reset, "GtkMenuItem_Reset");
GLADE_HOOKUP_OBJECT (MainWindow, GtkMenuItem_Arguments, "GtkMenuItem_Arguments");
GLADE_HOOKUP_OBJECT (MainWindow, GtkMenuItem_Configuration, "GtkMenuItem_Configuration"); GLADE_HOOKUP_OBJECT (MainWindow, GtkMenuItem_Configuration, "GtkMenuItem_Configuration");
GLADE_HOOKUP_OBJECT (MainWindow, GtkMenuItem_Configuration_menu, "GtkMenuItem_Configuration_menu"); GLADE_HOOKUP_OBJECT (MainWindow, GtkMenuItem_Configuration_menu, "GtkMenuItem_Configuration_menu");
GLADE_HOOKUP_OBJECT (MainWindow, GtkMenuItem_PluginsBios, "GtkMenuItem_PluginsBios"); GLADE_HOOKUP_OBJECT (MainWindow, GtkMenuItem_PluginsBios, "GtkMenuItem_PluginsBios");
@ -2894,10 +2907,13 @@ create_MainWindow (void)
GLADE_HOOKUP_OBJECT (MainWindow, separator7, "separator7"); GLADE_HOOKUP_OBJECT (MainWindow, separator7, "separator7");
GLADE_HOOKUP_OBJECT (MainWindow, enable_console1, "enable_console1"); GLADE_HOOKUP_OBJECT (MainWindow, enable_console1, "enable_console1");
GLADE_HOOKUP_OBJECT (MainWindow, enable_patches1, "enable_patches1"); GLADE_HOOKUP_OBJECT (MainWindow, enable_patches1, "enable_patches1");
GLADE_HOOKUP_OBJECT (MainWindow, print_cdvd_info1, "print_cdvd_info1");
GLADE_HOOKUP_OBJECT (MainWindow, GtkMenuItem_Debug, "GtkMenuItem_Debug"); GLADE_HOOKUP_OBJECT (MainWindow, GtkMenuItem_Debug, "GtkMenuItem_Debug");
GLADE_HOOKUP_OBJECT (MainWindow, GtkMenuItem_Debug_menu, "GtkMenuItem_Debug_menu"); GLADE_HOOKUP_OBJECT (MainWindow, GtkMenuItem_Debug_menu, "GtkMenuItem_Debug_menu");
GLADE_HOOKUP_OBJECT (MainWindow, GtkMenuItem_EnterDebugger, "GtkMenuItem_EnterDebugger"); GLADE_HOOKUP_OBJECT (MainWindow, GtkMenuItem_EnterDebugger, "GtkMenuItem_EnterDebugger");
GLADE_HOOKUP_OBJECT (MainWindow, GtkMenuItem_Logging, "GtkMenuItem_Logging"); GLADE_HOOKUP_OBJECT (MainWindow, GtkMenuItem_Logging, "GtkMenuItem_Logging");
GLADE_HOOKUP_OBJECT (MainWindow, separator8, "separator8");
GLADE_HOOKUP_OBJECT (MainWindow, GtkMenuItem_Arguments, "GtkMenuItem_Arguments");
GLADE_HOOKUP_OBJECT (MainWindow, GtkMenuItem_Help, "GtkMenuItem_Help"); GLADE_HOOKUP_OBJECT (MainWindow, GtkMenuItem_Help, "GtkMenuItem_Help");
GLADE_HOOKUP_OBJECT (MainWindow, GtkMenuItem_Help_menu, "GtkMenuItem_Help_menu"); GLADE_HOOKUP_OBJECT (MainWindow, GtkMenuItem_Help_menu, "GtkMenuItem_Help_menu");
GLADE_HOOKUP_OBJECT (MainWindow, GtkMenuItem_About, "GtkMenuItem_About"); GLADE_HOOKUP_OBJECT (MainWindow, GtkMenuItem_About, "GtkMenuItem_About");

View File

@ -4964,15 +4964,6 @@ Version x.x</property>
<signal name="activate" handler="OnEmu_Reset"/> <signal name="activate" handler="OnEmu_Reset"/>
</widget> </widget>
</child> </child>
<child>
<widget class="GtkMenuItem" id="GtkMenuItem_Arguments">
<property name="visible">True</property>
<property name="label" translatable="yes">_Arguments</property>
<property name="use_underline">True</property>
<signal name="activate" handler="OnEmu_Arguments"/>
</widget>
</child>
</widget> </widget>
</child> </child>
</widget> </widget>
@ -5180,6 +5171,16 @@ Version x.x</property>
<signal name="activate" handler="on_enable_patches1_activate"/> <signal name="activate" handler="on_enable_patches1_activate"/>
</widget> </widget>
</child> </child>
<child>
<widget class="GtkCheckMenuItem" id="print_cdvd_info1">
<property name="visible">True</property>
<property name="label" translatable="yes">Print CDVD Info</property>
<property name="use_underline">True</property>
<property name="active">False</property>
<signal name="activate" handler="OnPrintCdvdInfo" last_modification_time="Tue, 17 Feb 2009 13:26:52 GMT"/>
</widget>
</child>
</widget> </widget>
</child> </child>
</widget> </widget>
@ -5211,6 +5212,21 @@ Version x.x</property>
<signal name="activate" handler="OnDebug_Logging"/> <signal name="activate" handler="OnDebug_Logging"/>
</widget> </widget>
</child> </child>
<child>
<widget class="GtkSeparatorMenuItem" id="separator8">
<property name="visible">True</property>
</widget>
</child>
<child>
<widget class="GtkMenuItem" id="GtkMenuItem_Arguments">
<property name="visible">True</property>
<property name="label" translatable="yes">_Arguments</property>
<property name="use_underline">True</property>
<signal name="activate" handler="OnEmu_Arguments"/>
</widget>
</child>
</widget> </widget>
</child> </child>
</widget> </widget>

View File

@ -36,8 +36,10 @@ DEBUG_FLAGS=" -O0 -g "
fi fi
WARNING_FLAGS="-Wall -Wno-format -Wno-unused-value" WARNING_FLAGS="-Wall -Wno-format -Wno-unused-value"
#Pcsx2 now crashes if --fomit-frame-pointer is enabled and MTGS is off NORMAL_FLAGS=" -pipe -msse -O3 "
NORMAL_FLAGS=" -pipe -O3 -fno-omit-frame-pointer -msse " # These optimizations seem to cause issues with GCC 4.3.3, so we'll turn them off.
NORMAL_FLAGS+=" -fno-guess-branch-probability -fno-dse -fno-tree-dse "
DEBUG_FLAGS+=" -g -msse ${WARNING_FLAGS} " DEBUG_FLAGS+=" -g -msse ${WARNING_FLAGS} "
dnl Check for debug build dnl Check for debug build
@ -47,7 +49,7 @@ AC_ARG_ENABLE(debug, AC_HELP_STRING([--enable-debug], [debug build]),
if test "x$debug" == xyes if test "x$debug" == xyes
then then
AC_DEFINE(_DEBUG,1,[_DEBUG]) AC_DEFINE(_DEBUG,1,[_DEBUG])
CFLAGS+=" ${DEBUG_FLAGS} -fpermissive -Xlinker -zmuldefs " CFLAGS+=" ${DEBUG_FLAGS} -Xlinker -zmuldefs "
CXXFLAGS+=" ${DEBUG_FLAGS} -fpermissive -Xlinker -zmuldefs " CXXFLAGS+=" ${DEBUG_FLAGS} -fpermissive -Xlinker -zmuldefs "
CCASFLAGS+=" -D_DEBUG ${DEBUG_FLAGS} " CCASFLAGS+=" -D_DEBUG ${DEBUG_FLAGS} "
MYOBJDIR="Debug" MYOBJDIR="Debug"

View File

@ -6,6 +6,10 @@ echo ----------------------
echo Building ZeroGS OpenGL echo Building ZeroGS OpenGL
echo ---------------------- echo ----------------------
if test "${ZEROGSOPTIONS+set}" != set ; then
export ZEROGSOPTIONS="--enable-sse2"
fi
cd ${curdir}/opengl cd ${curdir}/opengl
if [ $# -gt 0 ] && [ $1 = "all" ] if [ $# -gt 0 ] && [ $1 = "all" ]
@ -15,7 +19,8 @@ aclocal
automake automake
autoconf autoconf
chmod +x configure chmod +x configure
./configure --enable-sse2 --prefix=${PCSX2PLUGINS} ./configure ${ZEROGSOPTIONS} --prefix=${PCSX2PLUGINS}
make clean make clean
make install make install

View File

@ -5010,6 +5010,7 @@ void ZeroGS::SetAlphaVariables(const alphaInfo& a)
s_srcalpha = GL_ONE; s_srcalpha = GL_ONE;
s_dstalpha = GL_ZERO; s_dstalpha = GL_ZERO;
s_alphaeq = GL_FUNC_ADD; s_alphaeq = GL_FUNC_ADD;
s_rgbeq = GL_FUNC_ADD;
s_alphaInfo = a; s_alphaInfo = a;

View File

@ -81,10 +81,56 @@ using namespace std;
#define B_RETURNX(x, rtype) { if( !(x) ) { ERROR_LOG("%s:%d: %s\n", __FILE__, (u32)__LINE__, #x); return (##rtype); } } #define B_RETURNX(x, rtype) { if( !(x) ) { ERROR_LOG("%s:%d: %s\n", __FILE__, (u32)__LINE__, #x); return (##rtype); } }
#define B_G(x, action) { if( !(x) ) { ERROR_LOG("%s:%d: %s\n", __FILE__, (u32)__LINE__, #x); action; } } #define B_G(x, action) { if( !(x) ) { ERROR_LOG("%s:%d: %s\n", __FILE__, (u32)__LINE__, #x); action; } }
#define GL_REPORT_ERROR() { err = glGetError(); if( err != GL_NO_ERROR ) { ERROR_LOG("%s:%d: gl error 0x%x\n", __FILE__, (int)__LINE__, err); ZeroGS::HandleGLError(); } }
#ifdef _DEBUG static __forceinline char *error_name(int err)
#define GL_REPORT_ERRORD() { GLenum err = glGetError(); if( err != GL_NO_ERROR ) { ERROR_LOG("%s:%d: gl error 0x%x\n", __FILE__, (int)__LINE__, err); ZeroGS::HandleGLError(); } } {
switch (err)
{
case GL_NO_ERROR:
return "GL_NO_ERROR";
case GL_INVALID_ENUM:
return "GL_INVALID_ENUM";
case GL_INVALID_VALUE:
return "GL_INVALID_VALUE";
case GL_INVALID_OPERATION:
return "GL_INVALID_OPERATION";
case GL_STACK_OVERFLOW:
return "GL_STACK_OVERFLOW";
case GL_STACK_UNDERFLOW:
return "GL_STACK_UNDERFLOW";
case GL_OUT_OF_MEMORY:
return "GL_OUT_OF_MEMORY";
case GL_TABLE_TOO_LARGE:
return "GL_TABLE_TOO_LARGE";
default:
{
char *str;
sprintf(str, "Unknown error(0x%x)", err);
return str;
}
}
}
#define GL_REPORT_ERROR() \
{ \
err = glGetError(); \
if( err != GL_NO_ERROR ) \
{ \
ERROR_LOG("%s:%d: gl error %s\n", __FILE__, (int)__LINE__, error_name(err)); \
ZeroGS::HandleGLError(); \
} \
}
#ifdef _DEBUG
#define GL_REPORT_ERRORD() \
{ \
GLenum err = glGetError(); \
if( err != GL_NO_ERROR ) \
{ \
ERROR_LOG("%s:%d: gl error %s\n", __FILE__, (int)__LINE__, error_name(err)); \
ZeroGS::HandleGLError(); \
} \
}
#else #else
#define GL_REPORT_ERRORD() #define GL_REPORT_ERRORD()
#endif #endif