Removed homepage code from DOS port. Removed needless routes for browser opening through assembly. Cleaned up Linux code for browser opening. Linux browser opening can now launch FireFox if called 'firefox' and opera. Documentation button functional.
This commit is contained in:
@@ -1482,9 +1482,6 @@ NEWSYM Check60hz
|
||||
; Call the timer update function here
|
||||
ret
|
||||
|
||||
NEWSYM GotoHomepage
|
||||
ret
|
||||
|
||||
NEWSYM GetTimeInSeconds
|
||||
push es
|
||||
mov ax,[selc0040]
|
||||
|
||||
@@ -94,7 +94,7 @@ EXTSYM Set_MouseYMax,Set_MousePosition,Get_MousePositionDisplacement,GUIInit
|
||||
EXTSYM GUIDeInit,SpecialLine,DrawWater,DrawBurn,SA1Enable,SA1RAMArea
|
||||
EXTSYM MMXCheck,SaveCombFile,showinfogui
|
||||
EXTSYM ErrorPointer,MessageOn,GetTime,sndrot,regsbackup,GetScreen
|
||||
EXTSYM GUITBWVID,Clear2xSaIBuffer,MouseWindow,GotoHomepage,cfgcvidmode
|
||||
EXTSYM GUITBWVID,Clear2xSaIBuffer,MouseWindow,cfgcvidmode
|
||||
EXTSYM ExitFromGUI,GUIWFVID,cfgvsync,newgfx16b,cfgscanline,cfginterp
|
||||
EXTSYM NumVideoModes,cfgvolume,MusicVol,DSPMem,NumInputDevices,GUIInputNames
|
||||
EXTSYM GUIVideoModeNames,GUISLVID,GUIINVID,GUIEAVID,GUIIEVID,GUIFSVID,GUIWSVID
|
||||
@@ -153,6 +153,10 @@ EXTSYM initDirectDraw,reInitSound,CheckAlwaysOnTop,CheckPriority,CheckScreenSave
|
||||
EXTSYM dssel,SetInputDevice209,initvideo2
|
||||
%endif
|
||||
|
||||
%ifndef __MSDOS__
|
||||
EXTSYM ZsnesPage,DocsPage
|
||||
%endif
|
||||
|
||||
%include "gui/guitools.inc"
|
||||
%include "gui/guimisc.inc"
|
||||
%include "gui/guimouse.inc"
|
||||
|
||||
@@ -735,10 +735,20 @@ ProcessMouseButtons:
|
||||
call AddCSCheatCode
|
||||
; call InsertSearchDescription
|
||||
.noinsertscc
|
||||
%ifndef __MSDOS__
|
||||
cmp byte[GUICBHold],65
|
||||
jne .nohomepage
|
||||
call GotoHomepage
|
||||
.nohomepage
|
||||
jne .nozsnespage
|
||||
pushad
|
||||
call ZsnesPage
|
||||
popad
|
||||
.nozsnespage
|
||||
cmp byte[GUICBHold],66
|
||||
jne .nodocspage
|
||||
pushad
|
||||
call DocsPage
|
||||
popad
|
||||
.nodocspage
|
||||
%endif
|
||||
mov byte[GUICBHold],0
|
||||
ret
|
||||
.checkmenuboxclick
|
||||
|
||||
@@ -1257,12 +1257,6 @@ NEWSYM SetInputDevice
|
||||
mov dword[eax+44],46
|
||||
ret
|
||||
|
||||
NEWSYM GotoHomepage
|
||||
pushad
|
||||
call ZsnesPage
|
||||
popad
|
||||
ret
|
||||
|
||||
EXTSYM SystemTimewHour
|
||||
EXTSYM SystemTimewMinute
|
||||
EXTSYM SystemTimewSecond
|
||||
|
||||
@@ -1300,13 +1300,13 @@ pid_t spc_fork() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
void LaunchBrowser(char *browser)
|
||||
void LaunchBrowser(char *browser, char *url)
|
||||
{
|
||||
char *arglist[] = { browser, "http://www.zsnes.com/", 0 };
|
||||
char *const arglist[] = { browser, url, 0 };
|
||||
execvp(browser, arglist);
|
||||
}
|
||||
|
||||
void ZsnesPage()
|
||||
void LaunchURL(char *url)
|
||||
{
|
||||
if (spc_fork()) //If fork failed, or we are the parent
|
||||
{
|
||||
@@ -1318,15 +1318,27 @@ void ZsnesPage()
|
||||
//We are now the child proccess
|
||||
|
||||
//If any of these LaunchBrowser() calls return that means it failed and we should try the next one
|
||||
LaunchBrowser("mozilla");
|
||||
LaunchBrowser("mozilla-firefox");
|
||||
LaunchBrowser("konqueror");
|
||||
LaunchBrowser("lynx");
|
||||
LaunchBrowser("links");
|
||||
LaunchBrowser("mozilla", url);
|
||||
LaunchBrowser("mozilla-firefox", url);
|
||||
LaunchBrowser("firefox", url);
|
||||
LaunchBrowser("konqueror", url);
|
||||
LaunchBrowser("opera", url);
|
||||
LaunchBrowser("lynx", url);
|
||||
LaunchBrowser("links", url);
|
||||
|
||||
_exit(0); //All browser launches failed, oh well
|
||||
}
|
||||
|
||||
void ZsnesPage()
|
||||
{
|
||||
LaunchURL("http://www.zsnes.com/");
|
||||
}
|
||||
|
||||
void DocsPage()
|
||||
{
|
||||
LaunchURL("http://zsnes-docs.sourceforge.net/");
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
Functions for battery power for Linux by Nach
|
||||
|
||||
@@ -1475,12 +1475,6 @@ NEWSYM SetInputDevice
|
||||
mov dword[eax+44],46
|
||||
ret
|
||||
|
||||
NEWSYM GotoHomepage
|
||||
pushad
|
||||
call ZsnesPage
|
||||
popad
|
||||
ret
|
||||
|
||||
NEWSYM GetTimeInSeconds
|
||||
push dword SystemTime
|
||||
call [_imp__GetLocalTime@4]
|
||||
|
||||
@@ -3090,6 +3090,12 @@ void ZsnesPage()
|
||||
MouseY = 0;
|
||||
}
|
||||
|
||||
void DocsPage()
|
||||
{
|
||||
ShellExecute(NULL, NULL, "http://zsnes-docs.sourceforge.net/", NULL, NULL, 0);
|
||||
MouseX = 0;
|
||||
MouseY = 0;
|
||||
}
|
||||
|
||||
extern "C" signed int NumberOfOpcodes;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user