[Scummvm-git-logs] scummvm branch-2-7 -> 00171bfd7d5b7744ddd189bbd73e74600253b5db

antoniou79 noreply at scummvm.org
Sun Mar 26 11:04:33 UTC 2023


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

Summary:
00171bfd7d ANDROID: Remove redundant exceptions and comments


Commit: 00171bfd7d5b7744ddd189bbd73e74600253b5db
    https://github.com/scummvm/scummvm/commit/00171bfd7d5b7744ddd189bbd73e74600253b5db
Author: antoniou79 (a.antoniou79 at gmail.com)
Date: 2023-03-26T14:04:19+03:00

Commit Message:
ANDROID: Remove redundant exceptions and comments

Changed paths:
    backends/platform/android/android.cpp
    backends/platform/android/android.h


diff --git a/backends/platform/android/android.cpp b/backends/platform/android/android.cpp
index ffb4725322c..77c5b5a9b58 100644
--- a/backends/platform/android/android.cpp
+++ b/backends/platform/android/android.cpp
@@ -43,10 +43,7 @@
 #define FORBIDDEN_SYMBOL_EXCEPTION_FILE
 #define FORBIDDEN_SYMBOL_EXCEPTION_fopen
 #define FORBIDDEN_SYMBOL_EXCEPTION_fclose
-//#define FORBIDDEN_SYMBOL_EXCEPTION_fputs
-//#define FORBIDDEN_SYMBOL_EXCEPTION_fwrite
 #define FORBIDDEN_SYMBOL_EXCEPTION_ftell
-//#define FORBIDDEN_SYMBOL_EXCEPTION_fflush
 
 #include <EGL/egl.h>
 #include <sys/time.h>
@@ -595,6 +592,9 @@ Common::WriteStream *OSystem_Android::createLogFileForAppending() {
 
 	FILE *scvmLogFilePtr = fopen(getDefaultLogFileName().c_str(), "a");
 	if (scvmLogFilePtr != nullptr) {
+		// We check for log file size; if it's too big, we rewrite it.
+		// This happens only upon app launch, in initBackend() when createLogFileForAppending() is called
+		// NOTE: We don't check for file size each time we write a log message.
 		long sz = ftell(scvmLogFilePtr);
 		if (sz > MAX_ANDROID_SCUMMVM_LOG_FILESIZE_IN_BYTES) {
 			fclose(scvmLogFilePtr);
diff --git a/backends/platform/android/android.h b/backends/platform/android/android.h
index 3e3ad59fb3c..26a734fa343 100644
--- a/backends/platform/android/android.h
+++ b/backends/platform/android/android.h
@@ -24,8 +24,6 @@
 
 #if defined(__ANDROID__)
 
-#define FORBIDDEN_SYMBOL_EXCEPTION_FILE
-
 #include "backends/platform/android/portdefs.h"
 #include "common/fs.h"
 #include "common/archive.h"




More information about the Scummvm-git-logs mailing list