[Scummvm-git-logs] scummvm master -> 43098ca47bb3c8f7a97c224edca3cb2764859347

Strangerke Strangerke at scummvm.org
Wed Jun 2 20:33:16 UTC 2021


This automated email contains information about 2 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
996e2386b6 CRYO: Fix crash in showMovie
43098ca47b CRYO: Save Preferred Subtitle Language to config, load it in InitPrefs instead of using the default language


Commit: 996e2386b665426473502132caf99739f35771bb
    https://github.com/scummvm/scummvm/commit/996e2386b665426473502132caf99739f35771bb
Author: Strangerke (arnaud.boutonne at gmail.com)
Date: 2021-06-02T21:31:45+01:00

Commit Message:
CRYO: Fix crash in showMovie

Changed paths:
    engines/cryo/eden_graphics.cpp


diff --git a/engines/cryo/eden_graphics.cpp b/engines/cryo/eden_graphics.cpp
index a2bf4483d3..6a673c819d 100644
--- a/engines/cryo/eden_graphics.cpp
+++ b/engines/cryo/eden_graphics.cpp
@@ -1177,7 +1177,7 @@ void EdenGraphics::showMovie(int16 num, char arg1) {
 		return;
 	}
 
-	int16 j;
+	int16 j = 0;
 	color_t palette16[256];
 	byte *palette = new byte[256 * 3];
 	CLPalette_GetLastPalette(palette16);


Commit: 43098ca47bb3c8f7a97c224edca3cb2764859347
    https://github.com/scummvm/scummvm/commit/43098ca47bb3c8f7a97c224edca3cb2764859347
Author: Strangerke (arnaud.boutonne at gmail.com)
Date: 2021-06-02T21:33:08+01:00

Commit Message:
CRYO: Save Preferred Subtitle Language to config, load it in InitPrefs instead of using the default language

Changed paths:
    engines/cryo/eden.cpp


diff --git a/engines/cryo/eden.cpp b/engines/cryo/eden.cpp
index 8addb7a858..8751b70e9f 100644
--- a/engines/cryo/eden.cpp
+++ b/engines/cryo/eden.cpp
@@ -5456,7 +5456,12 @@ void EdenGame::choseSubtitleOption() {
 		return;
 	if (lang > 5)
 		return;
+	
 	_globals->_prefLanguage = lang;
+	// save the new preferred language in the config
+	ConfMan.setInt("PrefLang", lang);
+	ConfMan.flushToDisk();
+	
 	_graphics->langbuftopanel();
 	displayLanguage();
 }
@@ -7828,7 +7833,16 @@ void EdenGame::enginePC() {
 }
 
 void EdenGame::LostEdenMac_InitPrefs() {
-	_globals->_prefLanguage = 1;
+	// Keep track of the preferred language previously selected in the option menu
+	int pref = ConfMan.getInt("PrefLang");
+	if (pref < 1 || pref > 5) {
+		pref = 1;
+		ConfMan.setInt("PrefLang", 1);
+		ConfMan.flushToDisk();
+	}
+
+	_globals->_prefLanguage = pref;
+	
 	_globals->_prefMusicVol[0] = 192;
 	_globals->_prefMusicVol[1] = 192;
 	_globals->_prefVoiceVol[0] = 255;




More information about the Scummvm-git-logs mailing list