-Restored Wiiflow mode plugin by fix94

-Restored fix filebrowser window overlapping
-Change all files End Of Line to windows mode
-Remove update check for updates
This commit is contained in:
Askot 2016-12-10 21:20:35 -07:00
parent 2d11edbce8
commit bc3cda6ae8
15 changed files with 188 additions and 49 deletions

8
.gitignore vendored
View File

@ -1,4 +1,4 @@
/snes9x-gx.pnps executables
/snes9x-gx.pnproj build_wii
/build_wii build_gc
/executables dist

View File

@ -2,8 +2,8 @@
<app version="1"> <app version="1">
<name>Visual Boy Advance GX</name> <name>Visual Boy Advance GX</name>
<coder>Tantric</coder> <coder>Tantric</coder>
<version>2.3.5</version> <version>2.3.6</version>
<release_date>20161210</release_date> <release_date>20161211</release_date>
<short_description>GBA/GBC/GB Emulator</short_description> <short_description>GBA/GBC/GB Emulator</short_description>
<long_description>A port of Visual Boy Advance - M to the Wii.</long_description> <long_description>A port of Visual Boy Advance - M to the Wii.</long_description>
<ahb_access /> <ahb_access />

View File

@ -38,6 +38,13 @@ https://github.com/dborth/vbagx/releases
|0O×øo· UPDATE HISTORY ·oø×O0| |0O×øo· UPDATE HISTORY ·oø×O0|
`¨•¨¨¨¨¨ ¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨ ¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨ ¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨ ¨¨¨¨¨¨¨¨¨¨¨¨¨' `¨•¨¨¨¨¨ ¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨ ¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨ ¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨ ¨¨¨¨¨¨¨¨¨¨¨¨¨'
[2.3.6 - December 11, 2016]
* Restored Wiiflow mode plugin by fix94
* Restored fix filebrowser window overlapping
* Change all files End Of Line to windows mode
* Remove update check for updates
[2.3.5 - December 10, 2016] [2.3.5 - December 10, 2016]
* Hide saving dialog that pops up briefly when returning from a game * Hide saving dialog that pops up briefly when returning from a game

View File

@ -156,7 +156,6 @@ devicecallback (void *arg)
usleep(THREAD_SLEEP); usleep(THREAD_SLEEP);
devsleep -= THREAD_SLEEP; devsleep -= THREAD_SLEEP;
} }
UpdateCheck();
} }
return NULL; return NULL;
} }

View File

@ -52,7 +52,7 @@ GuiFileBrowser::GuiFileBrowser(int w, int h)
scrollbarImg = new GuiImage(scrollbar); scrollbarImg = new GuiImage(scrollbar);
scrollbarImg->SetParent(this); scrollbarImg->SetParent(this);
scrollbarImg->SetAlignment(ALIGN_RIGHT, ALIGN_TOP); scrollbarImg->SetAlignment(ALIGN_RIGHT, ALIGN_TOP);
scrollbarImg->SetPosition(0, 30); scrollbarImg->SetPosition(5, 30);
arrowDown = new GuiImageData(scrollbar_arrowdown_png); arrowDown = new GuiImageData(scrollbar_arrowdown_png);
arrowDownImg = new GuiImage(arrowDown); arrowDownImg = new GuiImage(arrowDown);
@ -78,6 +78,7 @@ GuiFileBrowser::GuiFileBrowser(int w, int h)
arrowUpBtn->SetTrigger(trigHeldA); arrowUpBtn->SetTrigger(trigHeldA);
arrowUpBtn->SetSoundOver(btnSoundOver); arrowUpBtn->SetSoundOver(btnSoundOver);
arrowUpBtn->SetSoundClick(btnSoundClick); arrowUpBtn->SetSoundClick(btnSoundClick);
arrowUpBtn->SetPosition(5, 0);
arrowDownBtn = new GuiButton(arrowDownImg->GetWidth(), arrowDownImg->GetHeight()); arrowDownBtn = new GuiButton(arrowDownImg->GetWidth(), arrowDownImg->GetHeight());
arrowDownBtn->SetParent(this); arrowDownBtn->SetParent(this);
@ -90,6 +91,7 @@ GuiFileBrowser::GuiFileBrowser(int w, int h)
arrowDownBtn->SetTrigger(trigHeldA); arrowDownBtn->SetTrigger(trigHeldA);
arrowDownBtn->SetSoundOver(btnSoundOver); arrowDownBtn->SetSoundOver(btnSoundOver);
arrowDownBtn->SetSoundClick(btnSoundClick); arrowDownBtn->SetSoundClick(btnSoundClick);
arrowDownBtn->SetPosition(5, 0);
scrollbarBoxBtn = new GuiButton(scrollbarBoxImg->GetWidth(), scrollbarBoxImg->GetHeight()); scrollbarBoxBtn = new GuiButton(scrollbarBoxImg->GetWidth(), scrollbarBoxImg->GetHeight());
scrollbarBoxBtn->SetParent(this); scrollbarBoxBtn->SetParent(this);
@ -102,6 +104,7 @@ GuiFileBrowser::GuiFileBrowser(int w, int h)
scrollbarBoxBtn->SetClickable(false); scrollbarBoxBtn->SetClickable(false);
scrollbarBoxBtn->SetHoldable(true); scrollbarBoxBtn->SetHoldable(true);
scrollbarBoxBtn->SetTrigger(trigHeldA); scrollbarBoxBtn->SetTrigger(trigHeldA);
scrollbarBoxBtn->SetPosition(5, 30);
for(int i=0; i<FILE_PAGESIZE; ++i) for(int i=0; i<FILE_PAGESIZE; ++i)
{ {
@ -430,7 +433,7 @@ void GuiFileBrowser::Update(GuiTrigger * t)
if(positionWiimote > 0) if(positionWiimote > 0)
{ {
position = positionWiimote; // follow wiimote cursor position = positionWiimote; // follow wiimote cursor
scrollbarBoxBtn->SetPosition(0,position+36); scrollbarBoxBtn->SetPosition(5,position+36);
} }
else if(listChanged || numEntries != browser.numEntries) else if(listChanged || numEntries != browser.numEntries)
{ {
@ -446,7 +449,7 @@ void GuiFileBrowser::Update(GuiTrigger * t)
{ {
position = 156 * (browser.pageIndex + FILE_PAGESIZE/2) / (float)browser.numEntries; position = 156 * (browser.pageIndex + FILE_PAGESIZE/2) / (float)browser.numEntries;
} }
scrollbarBoxBtn->SetPosition(0,position+36); scrollbarBoxBtn->SetPosition(5,position+36);
} }
listChanged = false; listChanged = false;

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 35 KiB

After

Width:  |  Height:  |  Size: 251 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 KiB

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 3.2 KiB

View File

@ -1212,7 +1212,6 @@ static int MenuGame()
// regardless of the weather, there should be no sun at night time! // regardless of the weather, there should be no sun at night time!
time(&long_time); // Get time as long integer. time(&long_time); // Get time as long integer.
newtime = localtime(&long_time); // Convert to local time. newtime = localtime(&long_time); // Convert to local time.
if (newtime->tm_hour > 21 || newtime->tm_hour < 5) if (newtime->tm_hour > 21 || newtime->tm_hour < 5)
{ {
sprintf(s, "Weather: Night Time"); sprintf(s, "Weather: Night Time");
@ -3213,6 +3212,10 @@ static int MenuSettingsEmulation()
sprintf (options.value[0], "Super Game Boy"); sprintf (options.value[0], "Super Game Boy");
else if (GCSettings.GBHardware == 3) else if (GCSettings.GBHardware == 3)
sprintf (options.value[0], "Game Boy"); sprintf (options.value[0], "Game Boy");
else if (GCSettings.GBHardware == 4)
sprintf (options.value[0], "Game Boy Advance");
else if (GCSettings.GBHardware == 5)
sprintf (options.value[0], "Super Game Boy 2");
if (GCSettings.SGBBorder == 0) if (GCSettings.SGBBorder == 0)
sprintf (options.value[1], "Off"); sprintf (options.value[1], "Off");

View File

@ -166,8 +166,12 @@ preparePrefsData ()
createXMLSetting("LoadMethod", "Load Method", toStr(GCSettings.LoadMethod)); createXMLSetting("LoadMethod", "Load Method", toStr(GCSettings.LoadMethod));
createXMLSetting("SaveMethod", "Save Method", toStr(GCSettings.SaveMethod)); createXMLSetting("SaveMethod", "Save Method", toStr(GCSettings.SaveMethod));
createXMLSetting("LoadFolder", "Load Folder", GCSettings.LoadFolder); createXMLSetting("LoadFolder", "Load Folder", GCSettings.LoadFolder);
createXMLSetting("LastFileLoaded", "Last File Loaded", GCSettings.LastFileLoaded);
createXMLSetting("SaveFolder", "Save Folder", GCSettings.SaveFolder); createXMLSetting("SaveFolder", "Save Folder", GCSettings.SaveFolder);
createXMLSetting("AppendAuto", "Append Auto to .SAV Files", toStr(GCSettings.AppendAuto));
//createXMLSetting("CheatFolder", "Cheats Folder", GCSettings.CheatFolder);
createXMLSetting("ScreenshotsFolder", "Screenshots Folder", GCSettings.ScreenshotsFolder); createXMLSetting("ScreenshotsFolder", "Screenshots Folder", GCSettings.ScreenshotsFolder);
createXMLSetting("BorderFolder", "SGB Borders Folder", GCSettings.BorderFolder);
createXMLSetting("CoverFolder", "Covers Folder", GCSettings.CoverFolder); createXMLSetting("CoverFolder", "Covers Folder", GCSettings.CoverFolder);
createXMLSetting("ArtworkFolder", "Artworks Folder", GCSettings.ArtworkFolder); createXMLSetting("ArtworkFolder", "Artworks Folder", GCSettings.ArtworkFolder);
createXMLSetting("ImageFolder", "Image Folder", GCSettings.ImageFolder); createXMLSetting("ImageFolder", "Image Folder", GCSettings.ImageFolder);
@ -186,11 +190,14 @@ preparePrefsData ()
createXMLSetting("gbaZoomVert", "GBA Vertical Zoom Level", FtoStr(GCSettings.gbaZoomVert)); createXMLSetting("gbaZoomVert", "GBA Vertical Zoom Level", FtoStr(GCSettings.gbaZoomVert));
createXMLSetting("gbZoomHor", "GB Horizontal Zoom Level", FtoStr(GCSettings.gbZoomHor)); createXMLSetting("gbZoomHor", "GB Horizontal Zoom Level", FtoStr(GCSettings.gbZoomHor));
createXMLSetting("gbZoomVert", "GB Vertical Zoom Level", FtoStr(GCSettings.gbZoomVert)); createXMLSetting("gbZoomVert", "GB Vertical Zoom Level", FtoStr(GCSettings.gbZoomVert));
createXMLSetting("gbFixed", "GB Fixed Pixel Ratio", toStr(GCSettings.gbFixed));
createXMLSetting("gbaFixed", "GBA Fixed Pixel Ratio", toStr(GCSettings.gbaFixed));
createXMLSetting("render", "Video Filtering", toStr(GCSettings.render)); createXMLSetting("render", "Video Filtering", toStr(GCSettings.render));
createXMLSetting("scaling", "Aspect Ratio Correction", toStr(GCSettings.scaling)); createXMLSetting("scaling", "Aspect Ratio Correction", toStr(GCSettings.scaling));
createXMLSetting("xshift", "Horizontal Video Shift", toStr(GCSettings.xshift)); createXMLSetting("xshift", "Horizontal Video Shift", toStr(GCSettings.xshift));
createXMLSetting("yshift", "Vertical Video Shift", toStr(GCSettings.yshift)); createXMLSetting("yshift", "Vertical Video Shift", toStr(GCSettings.yshift));
createXMLSetting("colorize", "Colorize Mono Gameboy", toStr(GCSettings.colorize)); createXMLSetting("colorize", "Colorize Mono Gameboy", toStr(GCSettings.colorize));
createXMLSetting("gbaFrameskip", "GBA Frameskip", toStr(GCSettings.gbaFrameskip));
createXMLSection("Menu", "Menu Settings"); createXMLSection("Menu", "Menu Settings");
@ -214,6 +221,12 @@ preparePrefsData ()
createXMLController(btnmap[CTRLR_CLASSIC], "ccpadmap", "Classic Controller"); createXMLController(btnmap[CTRLR_CLASSIC], "ccpadmap", "Classic Controller");
createXMLController(btnmap[CTRLR_NUNCHUK], "ncpadmap", "Nunchuk"); createXMLController(btnmap[CTRLR_NUNCHUK], "ncpadmap", "Nunchuk");
createXMLSection("Emulation", "Emulation Settings");
createXMLSetting("OffsetMinutesUTC", "Offset from UTC (minutes)", toStr(GCSettings.OffsetMinutesUTC));
createXMLSetting("GBHardware", "Hardware (GB/GBC)", toStr(GCSettings.GBHardware));
createXMLSetting("SGBBorder", "Border (GB/GBC)", toStr(GCSettings.SGBBorder));
int datasize = mxmlSaveString(xml, (char *)savebuffer, SAVEBUFFERSIZE, XMLSaveCallback); int datasize = mxmlSaveString(xml, (char *)savebuffer, SAVEBUFFERSIZE, XMLSaveCallback);
mxmlDelete(xml); mxmlDelete(xml);
@ -456,6 +469,9 @@ decodePrefsData ()
result = false; result = false;
else if(verMajor < 2) // less than version 2.0.0 else if(verMajor < 2) // less than version 2.0.0
result = false; // reset settings (sorry, should update settings instead) result = false; // reset settings (sorry, should update settings instead)
else if((verMajor*100 + verMinor*10 + verPoint) >
(curMajor*100 + curMinor*10 + curPoint)) // some future version
result = false; // reset settings
else else
result = true; result = true;
} }
@ -470,8 +486,12 @@ decodePrefsData ()
loadXMLSetting(&GCSettings.LoadMethod, "LoadMethod"); loadXMLSetting(&GCSettings.LoadMethod, "LoadMethod");
loadXMLSetting(&GCSettings.SaveMethod, "SaveMethod"); loadXMLSetting(&GCSettings.SaveMethod, "SaveMethod");
loadXMLSetting(GCSettings.LoadFolder, "LoadFolder", sizeof(GCSettings.LoadFolder)); loadXMLSetting(GCSettings.LoadFolder, "LoadFolder", sizeof(GCSettings.LoadFolder));
loadXMLSetting(GCSettings.LastFileLoaded, "LastFileLoaded", sizeof(GCSettings.LastFileLoaded));
loadXMLSetting(GCSettings.SaveFolder, "SaveFolder", sizeof(GCSettings.SaveFolder)); loadXMLSetting(GCSettings.SaveFolder, "SaveFolder", sizeof(GCSettings.SaveFolder));
loadXMLSetting(&GCSettings.AppendAuto, "AppendAuto");
//loadXMLSetting(GCSettings.CheatFolder, "CheatFolder", sizeof(GCSettings.CheatFolder));
loadXMLSetting(GCSettings.ScreenshotsFolder, "ScreenshotsFolder", sizeof(GCSettings.ScreenshotsFolder)); loadXMLSetting(GCSettings.ScreenshotsFolder, "ScreenshotsFolder", sizeof(GCSettings.ScreenshotsFolder));
loadXMLSetting(GCSettings.BorderFolder, "BorderFolder", sizeof(GCSettings.BorderFolder));
loadXMLSetting(GCSettings.CoverFolder, "CoverFolder", sizeof(GCSettings.CoverFolder)); loadXMLSetting(GCSettings.CoverFolder, "CoverFolder", sizeof(GCSettings.CoverFolder));
loadXMLSetting(GCSettings.ArtworkFolder, "ArtworkFolder", sizeof(GCSettings.ArtworkFolder)); loadXMLSetting(GCSettings.ArtworkFolder, "ArtworkFolder", sizeof(GCSettings.ArtworkFolder));
loadXMLSetting(GCSettings.ImageFolder, "ImageFolder", sizeof(GCSettings.ImageFolder)); loadXMLSetting(GCSettings.ImageFolder, "ImageFolder", sizeof(GCSettings.ImageFolder));
@ -490,11 +510,14 @@ decodePrefsData ()
loadXMLSetting(&GCSettings.gbaZoomVert, "gbaZoomVert"); loadXMLSetting(&GCSettings.gbaZoomVert, "gbaZoomVert");
loadXMLSetting(&GCSettings.gbZoomHor, "gbZoomHor"); loadXMLSetting(&GCSettings.gbZoomHor, "gbZoomHor");
loadXMLSetting(&GCSettings.gbZoomVert, "gbZoomVert"); loadXMLSetting(&GCSettings.gbZoomVert, "gbZoomVert");
loadXMLSetting(&GCSettings.gbaFixed, "gbaFixed");
loadXMLSetting(&GCSettings.gbFixed, "gbFixed");
loadXMLSetting(&GCSettings.render, "render"); loadXMLSetting(&GCSettings.render, "render");
loadXMLSetting(&GCSettings.scaling, "scaling"); loadXMLSetting(&GCSettings.scaling, "scaling");
loadXMLSetting(&GCSettings.xshift, "xshift"); loadXMLSetting(&GCSettings.xshift, "xshift");
loadXMLSetting(&GCSettings.yshift, "yshift"); loadXMLSetting(&GCSettings.yshift, "yshift");
loadXMLSetting(&GCSettings.colorize, "colorize"); loadXMLSetting(&GCSettings.colorize, "colorize");
loadXMLSetting(&GCSettings.gbaFrameskip, "gbaFrameskip");
// Menu Settings // Menu Settings
@ -506,11 +529,6 @@ decodePrefsData ()
loadXMLSetting(&GCSettings.language, "language"); loadXMLSetting(&GCSettings.language, "language");
loadXMLSetting(&GCSettings.PreviewImage, "PreviewImage"); loadXMLSetting(&GCSettings.PreviewImage, "PreviewImage");
// Emulation Settings
loadXMLSetting(&GCSettings.BasicPalette, "BasicPalette");
// Controller Settings // Controller Settings
loadXMLSetting(&GCSettings.WiiControls, "WiiControls"); loadXMLSetting(&GCSettings.WiiControls, "WiiControls");
@ -518,6 +536,14 @@ decodePrefsData ()
loadXMLController(btnmap[CTRLR_WIIMOTE], "wmpadmap"); loadXMLController(btnmap[CTRLR_WIIMOTE], "wmpadmap");
loadXMLController(btnmap[CTRLR_CLASSIC], "ccpadmap"); loadXMLController(btnmap[CTRLR_CLASSIC], "ccpadmap");
loadXMLController(btnmap[CTRLR_NUNCHUK], "ncpadmap"); loadXMLController(btnmap[CTRLR_NUNCHUK], "ncpadmap");
// Emulation Settings
loadXMLSetting(&GCSettings.OffsetMinutesUTC, "OffsetMinutesUTC");
loadXMLSetting(&GCSettings.GBHardware, "GBHardware");
loadXMLSetting(&GCSettings.SGBBorder, "SGBBorder");
loadXMLSetting(&GCSettings.BasicPalette, "BasicPalette");
} }
mxmlDelete(xml); mxmlDelete(xml);
} }
@ -592,9 +618,9 @@ void FixInvalidSettings()
GCSettings.SFXVolume = 40; GCSettings.SFXVolume = 40;
if(GCSettings.language < 0 || GCSettings.language >= LANG_LENGTH) if(GCSettings.language < 0 || GCSettings.language >= LANG_LENGTH)
GCSettings.language = LANG_ENGLISH; GCSettings.language = LANG_ENGLISH;
if(!(GCSettings.render >= 0 && GCSettings.render < 3)) if(!(GCSettings.render >= 0 && GCSettings.render < 5))
GCSettings.render = 1; GCSettings.render = 1;
if(!(GCSettings.videomode >= 0 && GCSettings.videomode < 5)) if(!(GCSettings.videomode >= 0 && GCSettings.videomode < 7))
GCSettings.videomode = 0; GCSettings.videomode = 0;
} }
@ -613,13 +639,16 @@ DefaultSettings ()
GCSettings.SaveMethod = DEVICE_AUTO; // Auto, SD, USB, Network (SMB) GCSettings.SaveMethod = DEVICE_AUTO; // Auto, SD, USB, Network (SMB)
sprintf (GCSettings.LoadFolder, "%s/roms", APPFOLDER); // Path to game files sprintf (GCSettings.LoadFolder, "%s/roms", APPFOLDER); // Path to game files
sprintf (GCSettings.SaveFolder, "%s/saves", APPFOLDER); // Path to save files sprintf (GCSettings.SaveFolder, "%s/saves", APPFOLDER); // Path to save files
sprintf (GCSettings.ScreenshotsFolder, "%s/screenshots", APPFOLDER); // Path to screenshot files sprintf (GCSettings.CheatFolder, "%s/cheats", APPFOLDER); // Path to cheat files
sprintf (GCSettings.ScreenshotsFolder, "%s/screenshots", APPFOLDER);
sprintf (GCSettings.BorderFolder, "%s/borders", APPFOLDER);
sprintf (GCSettings.CoverFolder, "%s/covers", APPFOLDER); // Path to cover files sprintf (GCSettings.CoverFolder, "%s/covers", APPFOLDER); // Path to cover files
sprintf (GCSettings.ArtworkFolder, "%s/artworks", APPFOLDER); // Path to artwork files sprintf (GCSettings.ArtworkFolder, "%s/artworks", APPFOLDER); // Path to artwork files
sprintf (GCSettings.ImageFolder, "%s/screenshots", APPFOLDER); sprintf (GCSettings.ImageFolder, "%s/screenshots", APPFOLDER);
GCSettings.AutoLoad = 1; GCSettings.AutoLoad = 1;
GCSettings.AutoSave = 1; GCSettings.AutoSave = 1;
GCSettings.AppendAuto = 1;
GCSettings.WiimoteOrientation = 0; GCSettings.WiimoteOrientation = 0;
@ -627,6 +656,8 @@ DefaultSettings ()
GCSettings.gbaZoomVert = 1.0; // GBA vertical zoom level GCSettings.gbaZoomVert = 1.0; // GBA vertical zoom level
GCSettings.gbZoomHor = 1.0; // GBA horizontal zoom level GCSettings.gbZoomHor = 1.0; // GBA horizontal zoom level
GCSettings.gbZoomVert = 1.0; // GBA vertical zoom level GCSettings.gbZoomVert = 1.0; // GBA vertical zoom level
GCSettings.gbFixed = 0; // not fixed - use zoom level
GCSettings.gbaFixed = 0; // not fixed - use zoom level
GCSettings.videomode = 0; // automatic video mode detection GCSettings.videomode = 0; // automatic video mode detection
GCSettings.render = 1; // Filtered GCSettings.render = 1; // Filtered
GCSettings.scaling = 1; // partial stretch GCSettings.scaling = 1; // partial stretch
@ -635,6 +666,7 @@ DefaultSettings ()
GCSettings.xshift = 0; // horizontal video shift GCSettings.xshift = 0; // horizontal video shift
GCSettings.yshift = 0; // vertical video shift GCSettings.yshift = 0; // vertical video shift
GCSettings.colorize = 0; // Colorize mono gameboy games GCSettings.colorize = 0; // Colorize mono gameboy games
GCSettings.gbaFrameskip = 1; // Turn auto-frameskip on for GBA games
GCSettings.WiimoteOrientation = 0; GCSettings.WiimoteOrientation = 0;
GCSettings.ExitAction = 0; GCSettings.ExitAction = 0;
@ -656,6 +688,9 @@ DefaultSettings ()
#else #else
GCSettings.language = LANG_ENGLISH; GCSettings.language = LANG_ENGLISH;
#endif #endif
GCSettings.OffsetMinutesUTC = 0;
GCSettings.GBHardware = 0;
GCSettings.SGBBorder = 0;
} }

View File

@ -244,14 +244,14 @@ ftgxCharData *FreeTypeGX::cacheGlyphData(wchar_t charCode)
textureHeight = adjustTextureHeight(glyphBitmap->rows); textureHeight = adjustTextureHeight(glyphBitmap->rows);
this->fontData[charCode] = (ftgxCharData){ this->fontData[charCode] = (ftgxCharData){
ftSlot->bitmap_left, (s16)(ftSlot->bitmap_left),
ftSlot->advance.x >> 6, (u16)(ftSlot->advance.x >> 6),
gIndex, (u16)(gIndex),
textureWidth, textureWidth,
textureHeight, textureHeight,
ftSlot->bitmap_top, (s16)(ftSlot->bitmap_top),
ftSlot->bitmap_top, (s16)(ftSlot->bitmap_top),
glyphBitmap->rows - ftSlot->bitmap_top, (s16)(glyphBitmap->rows - ftSlot->bitmap_top),
NULL NULL
}; };
this->loadGlyphData(glyphBitmap, &this->fontData[charCode]); this->loadGlyphData(glyphBitmap, &this->fontData[charCode]);

View File

@ -116,3 +116,4 @@ blargg_err_t Gb_Apu::load_state( gb_apu_state_t const& in )
return 0; return 0;
} }

View File

@ -17,6 +17,7 @@
#include <wiiuse/wpad.h> #include <wiiuse/wpad.h>
#include <wupc/wupc.h> #include <wupc/wupc.h>
#include <sys/iosupport.h> #include <sys/iosupport.h>
#include <string>
#ifdef HW_RVL #ifdef HW_RVL
#include <di/di.h> #include <di/di.h>
@ -77,6 +78,26 @@ static void ExitCleanup()
void (*PSOReload) () = (void (*)()) 0x80001800; void (*PSOReload) () = (void (*)()) 0x80001800;
#endif #endif
void ExitToWiiflow()
{
ShutoffRumble();
SavePrefs(SILENT);
if (ROMLoaded && !ConfigRequested && GCSettings.AutoSave == 1)
SaveBatteryOrStateAuto(FILE_SRAM, SILENT);
ExitCleanup();
if( !!*(u32*)0x80001800 )
{
// Were we launched via HBC? (or via wiiflows stub replacement? :P)
exit(1);
}
else
{
// Wii channel support
SYS_ResetSystem( SYS_RETURNTOMENU, 0, 0 );
}
}
void ExitApp() void ExitApp()
{ {
#ifdef HW_RVL #ifdef HW_RVL
@ -379,6 +400,64 @@ int main(int argc, char *argv[])
gameScreenPng = (u8 *)malloc(512*1024); gameScreenPng = (u8 *)malloc(512*1024);
InitGUIThreads(); InitGUIThreads();
bool autoboot = false;
if(argc > 3 && argv[1] != NULL && argv[2] != NULL && argv[3] != NULL)
{
autoboot = true;
ResetBrowser();
LoadPrefs();
if(strcasestr(argv[1], "sd:/") != NULL)
{
GCSettings.SaveMethod = DEVICE_SD;
GCSettings.LoadMethod = DEVICE_SD;
}
else
{
GCSettings.SaveMethod = DEVICE_USB;
GCSettings.LoadMethod = DEVICE_USB;
}
SavePrefs(SILENT);
selectLoadedFile = 1;
std::string dir(argv[1]);
dir.assign(&dir[dir.find_last_of(":") + 2]);
char arg_filename[1024];
strncpy(arg_filename, argv[2], sizeof(arg_filename));
strncpy(GCSettings.LoadFolder, dir.c_str(), sizeof(GCSettings.LoadFolder));
OpenGameList();
strncpy(GCSettings.Exit_Dol_File, argv[3], sizeof(GCSettings.Exit_Dol_File));
if(argc > 5 && argv[4] != NULL && argv[5] != NULL)
{
sscanf(argv[4], "%08x", &GCSettings.Exit_Channel[0]);
sscanf(argv[5], "%08x", &GCSettings.Exit_Channel[1]);
}
else
{
GCSettings.Exit_Channel[0] = 0x00010008;
GCSettings.Exit_Channel[1] = 0x57494948;
}
if(argc > 6 && argv[6] != NULL)
strncpy(GCSettings.LoaderName, argv[6], sizeof(GCSettings.LoaderName));
else
snprintf(GCSettings.LoaderName, sizeof(GCSettings.LoaderName), "WiiFlow");
for(int i = 0; i < browser.numEntries; i++)
{
// Skip it
if (strcmp(browserList[i].filename, ".") == 0 || strcmp(browserList[i].filename, "..") == 0)
continue;
if(strcasestr(browserList[i].filename, arg_filename) != NULL)
{
browser.selIndex = i;
if(IsSz())
{
BrowserLoadSz();
browser.selIndex = 1;
}
break;
}
}
BrowserLoadFile();
}
while(1) // main loop while(1) // main loop
{ {
// go back to checking if devices were inserted/removed // go back to checking if devices were inserted/removed
@ -387,6 +466,8 @@ int main(int argc, char *argv[])
SwitchAudioMode(1); SwitchAudioMode(1);
if(!autoboot)
{
if(!ROMLoaded) if(!ROMLoaded)
MainMenu(MENU_GAMESELECTION); MainMenu(MENU_GAMESELECTION);
else else
@ -394,6 +475,12 @@ int main(int argc, char *argv[])
ConfigRequested = 0; ConfigRequested = 0;
ScreenshotRequested = 0; ScreenshotRequested = 0;
}
else if(ROMLoaded && autoboot)
autoboot = false;
else
ExitApp();
SwitchAudioMode(0); SwitchAudioMode(0);
// stop checking if devices were removed/inserted // stop checking if devices were removed/inserted

View File

@ -16,7 +16,7 @@
#include "utils/FreeTypeGX.h" #include "utils/FreeTypeGX.h"
#define APPNAME "Visual Boy Advance GX" #define APPNAME "Visual Boy Advance GX"
#define APPVERSION "2.3.5" #define APPVERSION "2.3.6"
#define APPFOLDER "vbagx" #define APPFOLDER "vbagx"
#define PREF_FILE_NAME "settings.xml" #define PREF_FILE_NAME "settings.xml"
#define PAL_FILE_NAME "palettes.xml" #define PAL_FILE_NAME "palettes.xml"
@ -108,6 +108,10 @@ struct SGCSettings
char ImageFolder[MAXPATHLEN]; //Saved image folder path char ImageFolder[MAXPATHLEN]; //Saved image folder path
char BorderFolder[MAXPATHLEN]; // Path to Super Game Boy border files char BorderFolder[MAXPATHLEN]; // Path to Super Game Boy border files
char Exit_Dol_File[MAXPATHLEN]; // Exit Path
char LoaderName[20]; // Menu Loader Name
u32 Exit_Channel[2]; // Exit Channel
char smbip[80]; char smbip[80];
char smbuser[20]; char smbuser[20];
char smbpwd[20]; char smbpwd[20];