From 973adc2772a3c84337ab8d8a871a2ddbfd6ee496 Mon Sep 17 00:00:00 2001 From: Max Lingua Date: Sun, 12 Jul 2009 22:00:47 +0000 Subject: On PS2 use "fprintf" (as in 0.13.x ) to print error messages to stderr, rather than "fputs", which is buggy in the PS2 implementation. svn-id: r42429 --- common/util.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'common/util.cpp') diff --git a/common/util.cpp b/common/util.cpp index e99bbeb12d..170e972c4f 100644 --- a/common/util.cpp +++ b/common/util.cpp @@ -477,7 +477,11 @@ void NORETURN error(const char *s, ...) { // Print the error message to stderr +#ifndef __PLAYSTATION2__ fputs(buf_output, stderr); +#else + fprintf(stderr, "%s\n", buf_output); +#endif // Unless this error -originated- within the debugger itself, we // now invoke the debugger, if available / supported. -- cgit v1.2.3 From 3427fb3100c84af0d63c8f8136615489fe0c7d47 Mon Sep 17 00:00:00 2001 From: Willem Jan Palenstijn Date: Sun, 12 Jul 2009 22:08:10 +0000 Subject: Remove double endline svn-id: r42430 --- common/util.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'common/util.cpp') diff --git a/common/util.cpp b/common/util.cpp index 170e972c4f..5f5e31aa93 100644 --- a/common/util.cpp +++ b/common/util.cpp @@ -480,7 +480,7 @@ void NORETURN error(const char *s, ...) { #ifndef __PLAYSTATION2__ fputs(buf_output, stderr); #else - fprintf(stderr, "%s\n", buf_output); + fprintf(stderr, "%s", buf_output); #endif // Unless this error -originated- within the debugger itself, we -- cgit v1.2.3 From 93c91945045b738fb098403228d91bce40b469f7 Mon Sep 17 00:00:00 2001 From: Max Lingua Date: Mon, 13 Jul 2009 00:55:30 +0000 Subject: Reverted my previous change (fprintf vs fputs), and properly implemented fputs for stderr case on PS2 ;-) svn-id: r42433 --- common/util.cpp | 4 ---- 1 file changed, 4 deletions(-) (limited to 'common/util.cpp') diff --git a/common/util.cpp b/common/util.cpp index 5f5e31aa93..e99bbeb12d 100644 --- a/common/util.cpp +++ b/common/util.cpp @@ -477,11 +477,7 @@ void NORETURN error(const char *s, ...) { // Print the error message to stderr -#ifndef __PLAYSTATION2__ fputs(buf_output, stderr); -#else - fprintf(stderr, "%s", buf_output); -#endif // Unless this error -originated- within the debugger itself, we // now invoke the debugger, if available / supported. -- cgit v1.2.3 From 51a9bfc9e2881aa7c7ddaa9cc6b2709acab5e725 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Mon, 13 Jul 2009 18:47:32 +0000 Subject: Refactor GUI options update into a function in Common: updateGameGUIOptions. svn-id: r42446 --- common/util.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'common/util.cpp') diff --git a/common/util.cpp b/common/util.cpp index e99bbeb12d..869cec4c48 100644 --- a/common/util.cpp +++ b/common/util.cpp @@ -24,6 +24,7 @@ #include "common/util.h" #include "common/system.h" +#include "common/config-manager.h" #include "gui/debugger.h" #include "engines/engine.h" @@ -420,6 +421,14 @@ String getGameGUIOptionsDescription(uint32 options) { return res; } +void updateGameGUIOptions(const uint32 options) { + if ((options && !ConfMan.hasKey("guioptions")) || + (ConfMan.hasKey("guioptions") && options != parseGameGUIOptions(ConfMan.get("guioptions")))) { + ConfMan.set("guioptions", getGameGUIOptionsDescription(options)); + ConfMan.flushToDisk(); + } +} + } // End of namespace Common -- cgit v1.2.3