mirror of
https://github.com/dborth/snes9xgx.git
synced 2024-11-27 21:14:21 +01:00
fix sound volume on startup
This commit is contained in:
parent
18f586f15a
commit
bab9a078a5
@ -3230,11 +3230,6 @@ MainMenu (int menu)
|
|||||||
pointer[3] = new GuiImageData(player4_point_png);
|
pointer[3] = new GuiImageData(player4_point_png);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef NO_SOUND
|
|
||||||
bgMusic = new GuiSound(bg_music_ogg, bg_music_ogg_size, SOUND_OGG);
|
|
||||||
bgMusic->SetVolume(GCSettings.MusicVolume);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
mainWindow = new GuiWindow(screenwidth, screenheight);
|
mainWindow = new GuiWindow(screenwidth, screenheight);
|
||||||
|
|
||||||
bgImg = new GuiImage(screenwidth, screenheight, (GXColor){175, 200, 215, 255});
|
bgImg = new GuiImage(screenwidth, screenheight, (GXColor){175, 200, 215, 255});
|
||||||
@ -3250,12 +3245,6 @@ MainMenu (int menu)
|
|||||||
mainWindow->Append(gameScreenImg);
|
mainWindow->Append(gameScreenImg);
|
||||||
bgImg->SetVisible(false);
|
bgImg->SetVisible(false);
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
#ifndef NO_SOUND
|
|
||||||
bgMusic->Play(); // startup music
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
GuiTrigger trigA;
|
GuiTrigger trigA;
|
||||||
if(GCSettings.WiimoteOrientation)
|
if(GCSettings.WiimoteOrientation)
|
||||||
@ -3287,16 +3276,28 @@ MainMenu (int menu)
|
|||||||
mainWindow->Append(bgBottomImg);
|
mainWindow->Append(bgBottomImg);
|
||||||
mainWindow->Append(btnLogo);
|
mainWindow->Append(btnLogo);
|
||||||
|
|
||||||
|
if(currentMenu == MENU_GAMESELECTION)
|
||||||
|
ResumeGui();
|
||||||
|
|
||||||
|
// Load preferences
|
||||||
|
if(!LoadPrefs())
|
||||||
|
SavePrefs(SILENT);
|
||||||
|
|
||||||
|
#ifndef NO_SOUND
|
||||||
|
if(currentMenu == MENU_GAMESELECTION)
|
||||||
|
{
|
||||||
|
bgMusic = new GuiSound(bg_music_ogg, bg_music_ogg_size, SOUND_OGG);
|
||||||
|
bgMusic->SetVolume(GCSettings.MusicVolume);
|
||||||
|
bgMusic->Play(); // startup music
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
// memory usage - for debugging
|
// memory usage - for debugging
|
||||||
/*memTxt = new GuiText(NULL, 18, (GXColor){255, 255, 255, 255});
|
/*memTxt = new GuiText(NULL, 18, (GXColor){255, 255, 255, 255});
|
||||||
memTxt->SetAlignment(ALIGN_RIGHT, ALIGN_TOP);
|
memTxt->SetAlignment(ALIGN_RIGHT, ALIGN_TOP);
|
||||||
memTxt->SetPosition(-20, 40);
|
memTxt->SetPosition(-20, 40);
|
||||||
mainWindow->Append(memTxt);*/
|
mainWindow->Append(memTxt);*/
|
||||||
|
|
||||||
// Load preferences
|
|
||||||
if(!LoadPrefs())
|
|
||||||
SavePrefs(SILENT);
|
|
||||||
|
|
||||||
while(currentMenu != MENU_EXIT || SNESROMSize <= 0)
|
while(currentMenu != MENU_EXIT || SNESROMSize <= 0)
|
||||||
{
|
{
|
||||||
switch (currentMenu)
|
switch (currentMenu)
|
||||||
|
@ -881,7 +881,7 @@ void TakeScreenshot()
|
|||||||
if(gameScreenTex2) free(gameScreenTex2);
|
if(gameScreenTex2) free(gameScreenTex2);
|
||||||
gameScreenTex2 = (u8 *)memalign(32, vmode->fbWidth * vmode->efbHeight * 4);
|
gameScreenTex2 = (u8 *)memalign(32, vmode->fbWidth * vmode->efbHeight * 4);
|
||||||
if(gameScreenTex2 == NULL) return;
|
if(gameScreenTex2 == NULL) return;
|
||||||
memcpy(gameScreenTex2, gameScreenTex, vmode->fbWidth * vmode->efbHeight * 4)
|
memcpy(gameScreenTex2, gameScreenTex, vmode->fbWidth * vmode->efbHeight * 4);
|
||||||
DCFlushRange(gameScreenTex2, vmode->fbWidth * vmode->efbHeight * 4);
|
DCFlushRange(gameScreenTex2, vmode->fbWidth * vmode->efbHeight * 4);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user