ANDROID: Comment out the logfile code

Since currently the logFile stuff are specific to SDL_BACKED
This commit is contained in:
antoniou 2020-09-24 10:13:12 +03:00
parent d546389b10
commit 75826f80fc
2 changed files with 48 additions and 48 deletions

View File

@ -130,8 +130,7 @@ public:
virtual Audio::Mixer *getMixer();
virtual void getTimeAndDate(TimeDate &t) const;
virtual void logMessage(LogMessageType::Type type, const char *message);
virtual void addSysArchivesToSearchSet(Common::SearchSet &s,
int priority = 0);
virtual void addSysArchivesToSearchSet(Common::SearchSet &s, int priority = 0);
virtual bool openUrl(const Common::String &url);
virtual bool hasTextInClipboard();
virtual Common::U32String getTextFromClipboard();

View File

@ -64,7 +64,7 @@ public class ScummVMActivity extends Activity implements OnKeyboardVisibilityLis
private File _configScummvmFile;
private File _actualScummVMDataDir;
private File _usingScummVMSavesDir;
private File _usingLogFile;
// private File _usingLogFile;
/**
@ -272,6 +272,7 @@ public class ScummVMActivity extends Activity implements OnKeyboardVisibilityLis
// Log.d(ScummVM.LOG_TAG, "SAVEPATH: " + _usingScummVMSavesDir.getPath());
// TODO log file setting via "--logfile=" + _usingLogFile.getPath() causes crash
// probably because this option is specific to SDL_BACKEND (see: base/commandLine.cpp)
_scummvm.setArgs(new String[]{
"ScummVM",
"--config=" + _configScummvmFile.getPath(),
@ -679,51 +680,51 @@ public class ScummVMActivity extends Activity implements OnKeyboardVisibilityLis
}
}
File internalScummVMLogsDir = new File(_actualScummVMDataDir, ".cache/scummvm/logs");
if (!internalScummVMLogsDir.exists() && internalScummVMLogsDir.mkdirs()) {
Log.d(ScummVM.LOG_TAG, "Created ScummVM Logs path: " + internalScummVMLogsDir.getPath());
} else if (internalScummVMLogsDir.isDirectory()) {
Log.d(ScummVM.LOG_TAG, "ScummVM Logs path already exists: " + internalScummVMLogsDir.getPath());
} else {
Log.e(ScummVM.LOG_TAG, "Could not create folder for ScummVM Logs path: " + internalScummVMLogsDir.getPath());
new AlertDialog.Builder(this)
.setTitle(R.string.no_log_file_title)
.setIcon(android.R.drawable.ic_dialog_alert)
.setMessage(R.string.no_log_file)
.setNegativeButton(R.string.quit,
new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int which) {
finish();
}
})
.show();
return false;
}
_usingLogFile = new File(internalScummVMLogsDir, "scummvm.log");
try {
if (_usingLogFile.exists() || !_usingLogFile.createNewFile()) {
Log.d(ScummVM.LOG_TAG, "ScummVM Log file already exists!");
Log.d(ScummVM.LOG_TAG, "Existing ScummVM Log: " + _usingLogFile.getPath());
} else {
Log.d(ScummVM.LOG_TAG, "An empty ScummVM log file was created!");
Log.d(ScummVM.LOG_TAG, "New ScummVM Log: " + _usingLogFile.getPath());
}
} catch (Exception e) {
e.printStackTrace();
new AlertDialog.Builder(this)
.setTitle(R.string.no_log_file_title)
.setIcon(android.R.drawable.ic_dialog_alert)
.setMessage(R.string.no_log_file)
.setNegativeButton(R.string.quit,
new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int which) {
finish();
}
})
.show();
return false;
}
// File internalScummVMLogsDir = new File(_actualScummVMDataDir, ".cache/scummvm/logs");
// if (!internalScummVMLogsDir.exists() && internalScummVMLogsDir.mkdirs()) {
// Log.d(ScummVM.LOG_TAG, "Created ScummVM Logs path: " + internalScummVMLogsDir.getPath());
// } else if (internalScummVMLogsDir.isDirectory()) {
// Log.d(ScummVM.LOG_TAG, "ScummVM Logs path already exists: " + internalScummVMLogsDir.getPath());
// } else {
// Log.e(ScummVM.LOG_TAG, "Could not create folder for ScummVM Logs path: " + internalScummVMLogsDir.getPath());
// new AlertDialog.Builder(this)
// .setTitle(R.string.no_log_file_title)
// .setIcon(android.R.drawable.ic_dialog_alert)
// .setMessage(R.string.no_log_file)
// .setNegativeButton(R.string.quit,
// new DialogInterface.OnClickListener() {
// public void onClick(DialogInterface dialog, int which) {
// finish();
// }
// })
// .show();
// return false;
// }
//
// _usingLogFile = new File(internalScummVMLogsDir, "scummvm.log");
// try {
// if (_usingLogFile.exists() || !_usingLogFile.createNewFile()) {
// Log.d(ScummVM.LOG_TAG, "ScummVM Log file already exists!");
// Log.d(ScummVM.LOG_TAG, "Existing ScummVM Log: " + _usingLogFile.getPath());
// } else {
// Log.d(ScummVM.LOG_TAG, "An empty ScummVM log file was created!");
// Log.d(ScummVM.LOG_TAG, "New ScummVM Log: " + _usingLogFile.getPath());
// }
// } catch (Exception e) {
// e.printStackTrace();
// new AlertDialog.Builder(this)
// .setTitle(R.string.no_log_file_title)
// .setIcon(android.R.drawable.ic_dialog_alert)
// .setMessage(R.string.no_log_file)
// .setNegativeButton(R.string.quit,
// new DialogInterface.OnClickListener() {
// public void onClick(DialogInterface dialog, int which) {
// finish();
// }
// })
// .show();
// return false;
// }
File internalScummVMConfigDir = new File(_actualScummVMDataDir, ".config/scummvm");
if (!internalScummVMConfigDir.exists() && internalScummVMConfigDir.mkdirs()) {