feat: settings saving

This commit is contained in:
str1k3r committed 2026-08-19 23:10:58 -04:00
1 parent 5a3c528ed0
commit f615927e0e
6 files changed
+22 -12

No files matched your search

@@ -1166,13 +1166,17 @@ void SoundEngine::playMusicTick()
void SoundEngine::playMusicUpdate()
{
//return;
static bool firstCall = true;
static float fMusicVol = 0.0f;
#ifndef _WINDOWS64 //str1k3r - if used on windows64 volume doesnt update
static bool firstCall = true;
if( firstCall )
{
fMusicVol = getMasterMusicVolume();
firstCall = false;
}
#else
fMusicVol = getMasterMusicVolume();
#endif
switch(m_StreamState)
{
@@ -1520,7 +1524,9 @@ void SoundEngine::playMusicUpdate()
}
// volume change required?
if(fMusicVol!=getMasterMusicVolume())
#ifndef _WINDOWS64
if(fMusicVol!=getMasterMusicVolume()) //str1k3r - if used on windows64 music doesnt update its volume
#endif
{
fMusicVol=getMasterMusicVolume();
HSAMPLE hSample = AIL_stream_sample_handle( m_hStream);
+7 -3
View File
@@ -764,11 +764,11 @@ void CMinecraftApp::InitGameSettings()
//SetDefaultGameSettings(i); - done on a callback from the profile manager
// 4J-PB - adding in for Windows & PS3 to set the defaults for the joypad
#if defined _WINDOWS64// || defined __PSVITA__
#if defined _WINDOWS64
C_4JProfile::PROFILESETTINGS *pProfileSettings=ProfileManager.GetDashboardProfileSettings(i);
// clear this for now - it will come from reading the system values
memset(pProfileSettings,0,sizeof(C_4JProfile::PROFILESETTINGS));
SetDefaultOptions(pProfileSettings,i);
ProfileManager.LoadSettings(GameSettingsA[i], sizeof(GAME_SETTINGS));
ApplyGameSettingsChanged(i);
#elif defined __PS3__ || defined __ORBIS__ || defined _DURANGO || defined __PSVITA__
C4JStorage::PROFILESETTINGS *pProfileSettings=StorageManager.GetDashboardProfileSettings(i);
// 4J-PB - don't cause an options write to happen here
@@ -2355,6 +2355,8 @@ void CMinecraftApp::CheckGameSettingsChanged(bool bOverride5MinuteTimer, int iPa
{
#if ( defined __PS3__ || defined __ORBIS__ || defined _DURANGO || defined __PSVITA__ )
StorageManager.WriteToProfile(i,true, bOverride5MinuteTimer);
#elif _WINDOWS64
ProfileManager.SaveSettings(GameSettingsA[i], sizeof(GAME_SETTINGS));
#else
ProfileManager.WriteToProfile(i,true, bOverride5MinuteTimer);
#endif
@@ -2368,6 +2370,8 @@ void CMinecraftApp::CheckGameSettingsChanged(bool bOverride5MinuteTimer, int iPa
{
#if ( defined __PS3__ || defined __ORBIS__ || defined _DURANGO || defined __PSVITA__)
StorageManager.WriteToProfile(iPad,true, bOverride5MinuteTimer);
#elif _WINDOWS64
ProfileManager.SaveSettings(GameSettingsA[iPad], sizeof(GAME_SETTINGS));
#else
ProfileManager.WriteToProfile(iPad,true, bOverride5MinuteTimer);
#endif
+1 -1
View File
@@ -35,7 +35,7 @@
#endif
#ifdef _WINDOWS64
C_4JProfile ProfileManager;
//C_4JProfile ProfileManager; //str1k3r - appears to not be needed and this causes a build error
#endif
CSentientManager SentientManager;
CXuiStringTable StringTable;
+4 -4
View File
@@ -651,7 +651,7 @@ void Gui::render(float a, bool mouseFree, int xMouse, int yMouse)
// 4J - do render of crouched player. This code is largely taken from the inventory render of the player, with some special hard-coded positions
// worked out by hand from the xui implementation of the crouch icon
if(app.GetGameSettings(iPad,eGameSetting_AnimatedCharacter))
if(app.GetGameSettings(iPad,eGameSetting_AnimatedCharacter) && !minecraft->options->renderDebug) //str1k3r - disable paperdoll if "F3" is on screen
{
//int playerIdx = minecraft->player->GetXboxPad();
@@ -852,11 +852,11 @@ void Gui::render(float a, bool mouseFree, int xMouse, int yMouse)
font->drawShadow(L"Seed: " + _toString<__int64>(minecraft->level->getLevelData()->getSeed() ), iSafezoneXHalf+2, 32 + 00, 0xffffff);
font->drawShadow(minecraft->gatherStats1(), iSafezoneXHalf+2, 32 + 10, 0xffffff);
font->drawShadow(minecraft->gatherStats2(), iSafezoneXHalf+2, 32 + 20, 0xffffff);
font->drawShadow(minecraft->gatherStats3(), iSafezoneXHalf+2, 32 + 30, 0xffffff);
font->drawShadow(minecraft->gatherStats4(), iSafezoneXHalf+2, 32 + 40, 0xffffff);
//font->drawShadow(minecraft->gatherStats3(), iSafezoneXHalf+2, 32 + 30, 0xffffff); //str1k3r - returns nothing
font->drawShadow(minecraft->gatherStats4(), iSafezoneXHalf+2, 32 + 30, 0xffffff);
// TERRAIN FEATURES
int iYPos=82;
int iYPos=72;
if(minecraft->level->dimension->id==0)
{
@@ -7,7 +7,7 @@ DWORD XGetLanguage()
GetUserDefaultLocaleName(wchLocaleName,LOCALE_NAME_MAX_LENGTH);
eMCLang eLang=(eMCLang)app.get_eMCLang(wchLocaleName);
#ifdef _DEBUG
#ifdef _XGETLANGDEBUG //str1k3r - make this its own def so we dont spam output on debug
app.DebugPrintf("XGetLanguage() ==> '%ls'\n", wchLocaleName);
#endif