fix moonlight crashing on Linux by disabling buggy icon set code
This commit is contained in:
@@ -11,8 +11,8 @@ static void *Handle = NULL;
|
||||
static INIT Module_Init;
|
||||
static SHUTDOWN Module_Shutdown;
|
||||
static SETTEXT Module_SetText;
|
||||
static SETICON Module_SetIcon;
|
||||
static SETSPLASH Module_SetSplash;
|
||||
//static SETICON Module_SetIcon;
|
||||
//static SETSPLASH Module_SetSplash;
|
||||
static SETPROGRESS Module_SetProgress;
|
||||
static SETINDETERMINATE Module_SetIndeterminate;
|
||||
|
||||
@@ -45,6 +45,7 @@ RString LoadingWindow_Gtk::Init()
|
||||
if( !Module_SetText )
|
||||
return ModuleError("SetText");
|
||||
|
||||
/*
|
||||
Module_SetIcon = (SETICON) dlsym(Handle, "SetIcon");
|
||||
if( !Module_SetIcon )
|
||||
return ModuleError("SetIcon");
|
||||
@@ -52,6 +53,7 @@ RString LoadingWindow_Gtk::Init()
|
||||
Module_SetSplash = (SETSPLASH) dlsym(Handle, "SetSplash");
|
||||
if( !Module_SetSplash )
|
||||
return ModuleError("SetSplash");
|
||||
*/
|
||||
|
||||
Module_SetProgress = (SETPROGRESS) dlsym(Handle, "SetProgress");
|
||||
if( !Module_SetProgress )
|
||||
@@ -85,12 +87,12 @@ void LoadingWindow_Gtk::SetText( RString s )
|
||||
|
||||
void LoadingWindow_Gtk::SetIcon( const RageSurface *pIcon )
|
||||
{
|
||||
Module_SetIcon( pIcon );
|
||||
//Module_SetIcon( pIcon );
|
||||
}
|
||||
|
||||
void LoadingWindow_Gtk::SetSplash( const RString str )
|
||||
{
|
||||
Module_SetSplash( str );
|
||||
//Module_SetSplash( str );
|
||||
}
|
||||
|
||||
void LoadingWindow_Gtk::SetProgress( const int progress )
|
||||
|
||||
@@ -87,14 +87,14 @@ extern "C" void SetIcon( const RageSurface *pSrcImg )
|
||||
gtk_window_set_icon( GTK_WINDOW(window), pIcon );
|
||||
gtk_main_iteration_do(FALSE);
|
||||
}
|
||||
|
||||
/*
|
||||
extern "C" void SetSplash( const char *s )
|
||||
{
|
||||
splash = gtk_image_new_from_file(s);
|
||||
gtk_widget_show(splash);
|
||||
gtk_main_iteration_do(FALSE);
|
||||
}
|
||||
|
||||
*/
|
||||
extern "C" void SetProgress( int progress, int totalWork )
|
||||
{
|
||||
gdouble fraction = ( totalWork > 0 ? progress / (gdouble)totalWork : 0 );
|
||||
|
||||
@@ -7,7 +7,7 @@ typedef const char *(*INIT)(int *argc, char ***argv);
|
||||
typedef void (*SHUTDOWN)();
|
||||
typedef void (*SETTEXT)( const char *s );
|
||||
typedef void (*SETICON)( const RageSurface *pSrcImg );
|
||||
typedef void (*SETSPLASH)( const char *s );
|
||||
//typedef void (*SETSPLASH)( const char *s );
|
||||
typedef void (*SETPROGRESS)( int progress, int totalWork );
|
||||
typedef void (*SETINDETERMINATE)( bool indeterminate );
|
||||
|
||||
|
||||
Reference in New Issue
Block a user