Android: Update Video logging

This commit is contained in:
zilmar 2022-07-25 17:35:43 +09:30
parent c59a0efcab
commit eaa19be60f
3 changed files with 100 additions and 44 deletions

View File

@ -4,6 +4,8 @@ import emu.project64.AndroidDevice;
import emu.project64.R; import emu.project64.R;
import emu.project64.jni.NativeExports; import emu.project64.jni.NativeExports;
import emu.project64.jni.SettingsID; import emu.project64.jni.SettingsID;
import emu.project64.jni.VideoSettingID;
import android.content.SharedPreferences; import android.content.SharedPreferences;
import android.os.Bundle; import android.os.Bundle;
import androidx.appcompat.app.ActionBar; import androidx.appcompat.app.ActionBar;
@ -74,24 +76,24 @@ public class SettingsActivity extends AppCompatActivity implements SharedPrefere
.putString("Debugger_TraceUserInterface",String.valueOf(NativeExports.SettingsLoadDword(SettingsID.Debugger_TraceUserInterface.toString()))) .putString("Debugger_TraceUserInterface",String.valueOf(NativeExports.SettingsLoadDword(SettingsID.Debugger_TraceUserInterface.toString())))
.putString("Debugger_TraceRomList",String.valueOf(NativeExports.SettingsLoadDword(SettingsID.Debugger_TraceRomList.toString()))) .putString("Debugger_TraceRomList",String.valueOf(NativeExports.SettingsLoadDword(SettingsID.Debugger_TraceRomList.toString())))
.putString("Debugger_TraceExceptionHandler",String.valueOf(NativeExports.SettingsLoadDword(SettingsID.Debugger_TraceExceptionHandler.toString()))) .putString("Debugger_TraceExceptionHandler",String.valueOf(NativeExports.SettingsLoadDword(SettingsID.Debugger_TraceExceptionHandler.toString())))
/*.putString("Debugger_TraceVideoMD5",String.valueOf(NativeExports.SettingsLoadDword(SettingsID.FirstGfxSettings.getValue() + VideoSettingID.Set_Logging_MD5.getValue()))) .putString("Debugger_TraceVideoMD5",String.valueOf(NativeExports.SettingsLoadDword(VideoSettingID.Set_Logging_MD5.toString())))
.putString("Debugger_TraceVideoThread",String.valueOf(NativeExports.SettingsLoadDword(SettingsID.FirstGfxSettings.getValue() + VideoSettingID.Set_Logging_Thread.getValue()))) .putString("Debugger_TraceVideoThread",String.valueOf(NativeExports.SettingsLoadDword( VideoSettingID.Set_Logging_Thread.toString())))
.putString("Debugger_TraceVideoPath",String.valueOf(NativeExports.SettingsLoadDword(SettingsID.FirstGfxSettings.getValue() + VideoSettingID.Set_Logging_Path.getValue()))) .putString("Debugger_TraceVideoPath",String.valueOf(NativeExports.SettingsLoadDword( VideoSettingID.Set_Logging_Path.toString())))
.putString("Debugger_TraceVideoSettings",String.valueOf(NativeExports.SettingsLoadDword(SettingsID.FirstGfxSettings.getValue() + VideoSettingID.Set_Logging_Settings.getValue()))) .putString("Debugger_TraceVideoSettings",String.valueOf(NativeExports.SettingsLoadDword( VideoSettingID.Set_Logging_Settings.toString())))
.putString("Debugger_TraceVideoUnknown",String.valueOf(NativeExports.SettingsLoadDword(SettingsID.FirstGfxSettings.getValue() + VideoSettingID.Set_Logging_Unknown.getValue()))) .putString("Debugger_TraceVideoUnknown",String.valueOf(NativeExports.SettingsLoadDword( VideoSettingID.Set_Logging_Unknown.toString())))
.putString("Debugger_TraceVideoGlide64",String.valueOf(NativeExports.SettingsLoadDword(SettingsID.FirstGfxSettings.getValue() + VideoSettingID.Set_Logging_Glide64.getValue()))) .putString("Debugger_TraceVideoGlide64",String.valueOf(NativeExports.SettingsLoadDword(VideoSettingID.Set_Logging_Glide64.toString())))
.putString("Debugger_TraceVideoInterface",String.valueOf(NativeExports.SettingsLoadDword(SettingsID.FirstGfxSettings.getValue() + VideoSettingID.Set_Logging_Interface.getValue()))) .putString("Debugger_TraceVideoInterface",String.valueOf(NativeExports.SettingsLoadDword(VideoSettingID.Set_Logging_Interface.toString())))
.putString("Debugger_TraceVideoResolution",String.valueOf(NativeExports.SettingsLoadDword(SettingsID.FirstGfxSettings.getValue() + VideoSettingID.Set_Logging_Resolution.getValue()))) .putString("Debugger_TraceVideoResolution",String.valueOf(NativeExports.SettingsLoadDword(VideoSettingID.Set_Logging_Resolution.toString())))
.putString("Debugger_TraceVideoGlitch",String.valueOf(NativeExports.SettingsLoadDword(SettingsID.FirstGfxSettings.getValue() + VideoSettingID.Set_Logging_Glitch.getValue()))) .putString("Debugger_TraceVideoGlitch",String.valueOf(NativeExports.SettingsLoadDword( VideoSettingID.Set_Logging_Glitch.toString())))
.putString("Debugger_TraceTraceVideoRDP",String.valueOf(NativeExports.SettingsLoadDword(SettingsID.FirstGfxSettings.getValue() + VideoSettingID.Set_Logging_VideoRDP.getValue()))) .putString("Debugger_TraceTraceVideoRDP",String.valueOf(NativeExports.SettingsLoadDword(VideoSettingID.Set_Logging_VideoRDP.toString())))
.putString("Debugger_TraceVideoTLUT",String.valueOf(NativeExports.SettingsLoadDword(SettingsID.FirstGfxSettings.getValue() + VideoSettingID.Set_Logging_TLUT.getValue()))) .putString("Debugger_TraceVideoTLUT",String.valueOf(NativeExports.SettingsLoadDword( VideoSettingID.Set_Logging_TLUT.toString())))
.putString("Debugger_TraceVideoPNG",String.valueOf(NativeExports.SettingsLoadDword(SettingsID.FirstGfxSettings.getValue() + VideoSettingID.Set_Logging_PNG.getValue()))) .putString("Debugger_TraceVideoPNG",String.valueOf(NativeExports.SettingsLoadDword(VideoSettingID.Set_Logging_PNG.toString())))
.putString("Debugger_TraceVideoOGLWrapper",String.valueOf(NativeExports.SettingsLoadDword(SettingsID.FirstGfxSettings.getValue() + VideoSettingID.Set_Logging_OGLWrapper.getValue()))) .putString("Debugger_TraceVideoOGLWrapper",String.valueOf(NativeExports.SettingsLoadDword(VideoSettingID.Set_Logging_OGLWrapper.toString())))
.putString("Debugger_TraceAudioInitShutdown",String.valueOf(NativeExports.SettingsLoadDword(SettingsID.FirstAudioSettings.getValue() + AudioSettingID.Logging_LogAudioInitShutdown.getValue()))) /*.putString("Debugger_TraceAudioInitShutdown",String.valueOf(NativeExports.SettingsLoadDword(SettingsID.FirstAudioSettings.getValue() + AudioSettingID.Logging_LogAudioInitShutdown.getValue())))
.putString("Debugger_TraceAudioAudioInterface",String.valueOf(NativeExports.SettingsLoadDword(SettingsID.FirstAudioSettings.getValue() + AudioSettingID.Logging_LogAudioInterface.getValue()))) .putString("Debugger_TraceAudioAudioInterface",String.valueOf(NativeExports.SettingsLoadDword(SettingsID.FirstAudioSettings.getValue() + AudioSettingID.Logging_LogAudioInterface.getValue())))
.putString("video_screenResolution",String.valueOf(NativeExports.SettingsLoadDword(SettingsID.FirstGfxSettings.getValue() + VideoSettingID.Set_Resolution.getValue()))) .putString("video_screenResolution",String.valueOf(NativeExports.SettingsLoadDword(SettingsID.FirstGfxSettings.getValue() + VideoSettingID.Set_Resolution.getValue())))
.putString("video_AspectRatio",String.valueOf(NativeExports.SettingsLoadDword(SettingsID.FirstGfxSettings.getValue() + VideoSettingID.Set_aspect.getValue()))) .putString("video_AspectRatio",String.valueOf(NativeExports.SettingsLoadDword(SettingsID.FirstGfxSettings.getValue() + VideoSettingID.Set_aspect.getValue())))*/
.putInt("MaxRomsRemembered",NativeExports.UISettingsLoadDword(UISettingID.File_RecentGameFileCount.getValue()))*/ //.putInt("MaxRomsRemembered",NativeExports.UISettingsLoadDword(UISettingID.File_RecentGameFileCount.getValue()))
.apply(); .apply();
sharedPrefs.registerOnSharedPreferenceChangeListener(this); sharedPrefs.registerOnSharedPreferenceChangeListener(this);
@ -169,20 +171,20 @@ public class SettingsActivity extends AppCompatActivity implements SharedPrefere
else if (key.equals("Debugger_TraceUserInterface")) { NativeExports.SettingsSaveDword(SettingsID.Debugger_TraceUserInterface.toString(), Integer.valueOf(sharedPreferences.getString(key, "1"))); } else if (key.equals("Debugger_TraceUserInterface")) { NativeExports.SettingsSaveDword(SettingsID.Debugger_TraceUserInterface.toString(), Integer.valueOf(sharedPreferences.getString(key, "1"))); }
else if (key.equals("Debugger_TraceRomList")) { NativeExports.SettingsSaveDword(SettingsID.Debugger_TraceRomList.toString(), Integer.valueOf(sharedPreferences.getString(key, "1"))); } else if (key.equals("Debugger_TraceRomList")) { NativeExports.SettingsSaveDword(SettingsID.Debugger_TraceRomList.toString(), Integer.valueOf(sharedPreferences.getString(key, "1"))); }
else if (key.equals("Debugger_TraceExceptionHandler")) { NativeExports.SettingsSaveDword(SettingsID.Debugger_TraceExceptionHandler.toString(), Integer.valueOf(sharedPreferences.getString(key, "1"))); } else if (key.equals("Debugger_TraceExceptionHandler")) { NativeExports.SettingsSaveDword(SettingsID.Debugger_TraceExceptionHandler.toString(), Integer.valueOf(sharedPreferences.getString(key, "1"))); }
/*else if (key.equals("Debugger_TraceVideoMD5")) { NativeExports.SettingsSaveDword(SettingsID.FirstGfxSettings.getValue() + VideoSettingID.Set_Logging_MD5.getValue(), Integer.valueOf(sharedPreferences.getString(key, "1"))); } else if (key.equals("Debugger_TraceVideoMD5")) { NativeExports.SettingsSaveDword(VideoSettingID.Set_Logging_MD5.toString(), Integer.valueOf(sharedPreferences.getString(key, "1"))); }
else if (key.equals("Debugger_TraceVideoThread")) { NativeExports.SettingsSaveDword(SettingsID.FirstGfxSettings.getValue() + VideoSettingID.Set_Logging_Thread.getValue(), Integer.valueOf(sharedPreferences.getString(key, "1"))); } else if (key.equals("Debugger_TraceVideoThread")) { NativeExports.SettingsSaveDword(VideoSettingID.Set_Logging_Thread.toString(), Integer.valueOf(sharedPreferences.getString(key, "1"))); }
else if (key.equals("Debugger_TraceVideoPath")) { NativeExports.SettingsSaveDword(SettingsID.FirstGfxSettings.getValue() + VideoSettingID.Set_Logging_Path.getValue(), Integer.valueOf(sharedPreferences.getString(key, "1"))); } else if (key.equals("Debugger_TraceVideoPath")) { NativeExports.SettingsSaveDword(VideoSettingID.Set_Logging_Path.toString(), Integer.valueOf(sharedPreferences.getString(key, "1"))); }
else if (key.equals("Debugger_TraceVideoSettings")) { NativeExports.SettingsSaveDword(SettingsID.FirstGfxSettings.getValue() + VideoSettingID.Set_Logging_Settings.getValue(), Integer.valueOf(sharedPreferences.getString(key, "1"))); } else if (key.equals("Debugger_TraceVideoSettings")) { NativeExports.SettingsSaveDword(VideoSettingID.Set_Logging_Settings.toString(), Integer.valueOf(sharedPreferences.getString(key, "1"))); }
else if (key.equals("Debugger_TraceVideoUnknown")) { NativeExports.SettingsSaveDword(SettingsID.FirstGfxSettings.getValue() + VideoSettingID.Set_Logging_Unknown.getValue(), Integer.valueOf(sharedPreferences.getString(key, "1"))); } else if (key.equals("Debugger_TraceVideoUnknown")) { NativeExports.SettingsSaveDword(VideoSettingID.Set_Logging_Unknown.toString(), Integer.valueOf(sharedPreferences.getString(key, "1"))); }
else if (key.equals("Debugger_TraceVideoGlide64")) { NativeExports.SettingsSaveDword(SettingsID.FirstGfxSettings.getValue() + VideoSettingID.Set_Logging_Glide64.getValue(), Integer.valueOf(sharedPreferences.getString(key, "1"))); } else if (key.equals("Debugger_TraceVideoGlide64")) { NativeExports.SettingsSaveDword(VideoSettingID.Set_Logging_Glide64.toString(), Integer.valueOf(sharedPreferences.getString(key, "1"))); }
else if (key.equals("Debugger_TraceVideoInterface")) { NativeExports.SettingsSaveDword(SettingsID.FirstGfxSettings.getValue() + VideoSettingID.Set_Logging_Interface.getValue(), Integer.valueOf(sharedPreferences.getString(key, "1"))); } else if (key.equals("Debugger_TraceVideoInterface")) { NativeExports.SettingsSaveDword(VideoSettingID.Set_Logging_Interface.toString(), Integer.valueOf(sharedPreferences.getString(key, "1"))); }
else if (key.equals("Debugger_TraceVideoResolution")) { NativeExports.SettingsSaveDword(SettingsID.FirstGfxSettings.getValue() + VideoSettingID.Set_Logging_Resolution.getValue(), Integer.valueOf(sharedPreferences.getString(key, "1"))); } else if (key.equals("Debugger_TraceVideoResolution")) { NativeExports.SettingsSaveDword(VideoSettingID.Set_Logging_Resolution.toString(), Integer.valueOf(sharedPreferences.getString(key, "1"))); }
else if (key.equals("Debugger_TraceVideoGlitch")) { NativeExports.SettingsSaveDword(SettingsID.FirstGfxSettings.getValue() + VideoSettingID.Set_Logging_Glitch.getValue(), Integer.valueOf(sharedPreferences.getString(key, "1"))); } else if (key.equals("Debugger_TraceVideoGlitch")) { NativeExports.SettingsSaveDword(VideoSettingID.Set_Logging_Glitch.toString(), Integer.valueOf(sharedPreferences.getString(key, "1"))); }
else if (key.equals("Debugger_TraceTraceVideoRDP")) { NativeExports.SettingsSaveDword(SettingsID.FirstGfxSettings.getValue() + VideoSettingID.Set_Logging_VideoRDP.getValue(), Integer.valueOf(sharedPreferences.getString(key, "1"))); } else if (key.equals("Debugger_TraceTraceVideoRDP")) { NativeExports.SettingsSaveDword( VideoSettingID.Set_Logging_VideoRDP.toString(), Integer.valueOf(sharedPreferences.getString(key, "1"))); }
else if (key.equals("Debugger_TraceVideoTLUT")) { NativeExports.SettingsSaveDword(SettingsID.FirstGfxSettings.getValue() + VideoSettingID.Set_Logging_TLUT.getValue(), Integer.valueOf(sharedPreferences.getString(key, "1"))); } else if (key.equals("Debugger_TraceVideoTLUT")) { NativeExports.SettingsSaveDword(VideoSettingID.Set_Logging_TLUT.toString(), Integer.valueOf(sharedPreferences.getString(key, "1"))); }
else if (key.equals("Debugger_TraceVideoPNG")) { NativeExports.SettingsSaveDword(SettingsID.FirstGfxSettings.getValue() + VideoSettingID.Set_Logging_PNG.getValue(), Integer.valueOf(sharedPreferences.getString(key, "1"))); } else if (key.equals("Debugger_TraceVideoPNG")) { NativeExports.SettingsSaveDword(VideoSettingID.Set_Logging_PNG.toString(), Integer.valueOf(sharedPreferences.getString(key, "1"))); }
else if (key.equals("Debugger_TraceVideoOGLWrapper")) { NativeExports.SettingsSaveDword(SettingsID.FirstGfxSettings.getValue() + VideoSettingID.Set_Logging_OGLWrapper.getValue(), Integer.valueOf(sharedPreferences.getString(key, "1"))); } else if (key.equals("Debugger_TraceVideoOGLWrapper")) { NativeExports.SettingsSaveDword(VideoSettingID.Set_Logging_OGLWrapper.toString(), Integer.valueOf(sharedPreferences.getString(key, "1"))); }
else if (key.equals("Debugger_TraceAudioInitShutdown")) { NativeExports.SettingsSaveDword(SettingsID.FirstAudioSettings.getValue() + AudioSettingID.Logging_LogAudioInitShutdown.getValue(), Integer.valueOf(sharedPreferences.getString(key, "1"))); } /*else if (key.equals("Debugger_TraceAudioInitShutdown")) { NativeExports.SettingsSaveDword(SettingsID.FirstAudioSettings.getValue() + AudioSettingID.Logging_LogAudioInitShutdown.getValue(), Integer.valueOf(sharedPreferences.getString(key, "1"))); }
else if (key.equals("Debugger_TraceAudioAudioInterface")) { NativeExports.SettingsSaveDword(SettingsID.FirstAudioSettings.getValue() + AudioSettingID.Logging_LogAudioInterface.getValue(), Integer.valueOf(sharedPreferences.getString(key, "1"))); } else if (key.equals("Debugger_TraceAudioAudioInterface")) { NativeExports.SettingsSaveDword(SettingsID.FirstAudioSettings.getValue() + AudioSettingID.Logging_LogAudioInterface.getValue(), Integer.valueOf(sharedPreferences.getString(key, "1"))); }
/*else if (key.equals("video_screenResolution")) { NativeExports.SettingsSaveDword(SettingsID.FirstGfxSettings.getValue() + VideoSettingID.Set_Resolution.getValue(), Integer.valueOf(sharedPreferences.getString(key, "1"))); } /*else if (key.equals("video_screenResolution")) { NativeExports.SettingsSaveDword(SettingsID.FirstGfxSettings.getValue() + VideoSettingID.Set_Resolution.getValue(), Integer.valueOf(sharedPreferences.getString(key, "1"))); }
else if (key.equals("video_AspectRatio")) else if (key.equals("video_AspectRatio"))

View File

@ -95,6 +95,7 @@
<string name="TraceRomList">Rom List</string> <string name="TraceRomList">Rom List</string>
<string name="TraceExceptionHandler">Exception Handler</string> <string name="TraceExceptionHandler">Exception Handler</string>
<string name="TraceVideoMD5">MD5</string> <string name="TraceVideoMD5">MD5</string>
<string name="TraceVideoThread">Thread</string>
<string name="TraceVideoPath">Path</string> <string name="TraceVideoPath">Path</string>
<string name="TraceVideoSettings">Settings</string> <string name="TraceVideoSettings">Settings</string>
<string name="TraceVideoUnknown">Unknown</string> <string name="TraceVideoUnknown">Unknown</string>

View File

@ -1,16 +1,69 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"> <PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
<emu.project64.settings.LogLevelPreference android:key="Debugger_TraceVideoMD5" android:title="@string/TraceVideoMD5" /> xmlns:app="http://schemas.android.com/apk/res-auto">
<emu.project64.settings.LogLevelPreference android:key="Debugger_TraceVideoThread" android:title="@string/TraceAudioAudioInterface" /> <emu.project64.settings.ListPreference
<emu.project64.settings.LogLevelPreference android:key="Debugger_TraceVideoPath" android:title="@string/TraceVideoPath" /> app:entries="@array/trace_severity_list"
<emu.project64.settings.LogLevelPreference android:key="Debugger_TraceVideoSettings" android:title="@string/TraceVideoSettings" /> app:entryValues="@array/trace_severity_values"
<emu.project64.settings.LogLevelPreference android:key="Debugger_TraceVideoUnknown" android:title="@string/TraceVideoUnknown" /> android:key="Debugger_TraceVideoMD5"
<emu.project64.settings.LogLevelPreference android:key="Debugger_TraceVideoGlide64" android:title="@string/TraceVideoGlide64" /> android:title="@string/TraceVideoMD5" />
<emu.project64.settings.LogLevelPreference android:key="Debugger_TraceVideoInterface" android:title="@string/TraceVideoInterface" /> <emu.project64.settings.ListPreference
<emu.project64.settings.LogLevelPreference android:key="Debugger_TraceVideoResolution" android:title="@string/TraceVideoResolution" /> app:entries="@array/trace_severity_list"
<emu.project64.settings.LogLevelPreference android:key="Debugger_TraceVideoGlitch" android:title="@string/TraceVideoGlitch" /> app:entryValues="@array/trace_severity_values"
<emu.project64.settings.LogLevelPreference android:key="Debugger_TraceTraceVideoRDP" android:title="@string/TraceVideoRDP" /> android:key="Debugger_TraceVideoThread"
<emu.project64.settings.LogLevelPreference android:key="Debugger_TraceVideoTLUT" android:title="@string/TraceVideoTLUT" /> android:title="@string/TraceVideoThread" />
<emu.project64.settings.LogLevelPreference android:key="Debugger_TraceVideoPNG" android:title="@string/TraceVideoPNG" /> <emu.project64.settings.ListPreference
<emu.project64.settings.LogLevelPreference android:key="Debugger_TraceVideoOGLWrapper" android:title="@string/TraceVideoOGLWrapper" /> app:entries="@array/trace_severity_list"
app:entryValues="@array/trace_severity_values"
android:key="Debugger_TraceVideoPath"
android:title="@string/TraceVideoPath" />
<emu.project64.settings.ListPreference
app:entries="@array/trace_severity_list"
app:entryValues="@array/trace_severity_values"
android:key="Debugger_TraceVideoSettings"
android:title="@string/TraceVideoSettings" />
<emu.project64.settings.ListPreference
app:entries="@array/trace_severity_list"
app:entryValues="@array/trace_severity_values"
android:key="Debugger_TraceVideoUnknown"
android:title="@string/TraceVideoUnknown" />
<emu.project64.settings.ListPreference
app:entries="@array/trace_severity_list"
app:entryValues="@array/trace_severity_values"
android:key="Debugger_TraceVideoGlide64"
android:title="@string/TraceVideoGlide64" />
<emu.project64.settings.ListPreference
app:entries="@array/trace_severity_list"
app:entryValues="@array/trace_severity_values"
android:key="Debugger_TraceVideoInterface"
android:title="@string/TraceVideoInterface" />
<emu.project64.settings.ListPreference
app:entries="@array/trace_severity_list"
app:entryValues="@array/trace_severity_values"
android:key="Debugger_TraceVideoResolution"
android:title="@string/TraceVideoResolution" />
<emu.project64.settings.ListPreference
app:entries="@array/trace_severity_list"
app:entryValues="@array/trace_severity_values"
android:key="Debugger_TraceVideoGlitch"
android:title="@string/TraceVideoGlitch" />
<emu.project64.settings.ListPreference
app:entries="@array/trace_severity_list"
app:entryValues="@array/trace_severity_values"
android:key="Debugger_TraceTraceVideoRDP"
android:title="@string/TraceVideoRDP" />
<emu.project64.settings.ListPreference
app:entries="@array/trace_severity_list"
app:entryValues="@array/trace_severity_values"
android:key="Debugger_TraceVideoTLUT"
android:title="@string/TraceVideoTLUT" />
<emu.project64.settings.ListPreference
app:entries="@array/trace_severity_list"
app:entryValues="@array/trace_severity_values"
android:key="Debugger_TraceVideoPNG"
android:title="@string/TraceVideoPNG" />
<emu.project64.settings.ListPreference
app:entries="@array/trace_severity_list"
app:entryValues="@array/trace_severity_values"
android:key="Debugger_TraceVideoOGLWrapper"
android:title="@string/TraceVideoOGLWrapper" />
</PreferenceScreen> </PreferenceScreen>