[Scummvm-git-logs] scummvm master -> ab2df113e328373d8fa3c0ea5c59fecdaba53295
antoniou79
noreply at scummvm.org
Sun Mar 26 11:03:20 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:
ab2df113e3 ANDROID: Remove redundant exceptions and comments
Commit: ab2df113e328373d8fa3c0ea5c59fecdaba53295
https://github.com/scummvm/scummvm/commit/ab2df113e328373d8fa3c0ea5c59fecdaba53295
Author: antoniou79 (a.antoniou79 at gmail.com)
Date: 2023-03-26T14:03:09+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