Android: log device info and settings
This commit is contained in:
parent
0af8406e44
commit
0e347605e1
|
@ -44,6 +44,7 @@ public class CitraApplication extends Application {
|
|||
DirectoryInitialization.start(getApplicationContext());
|
||||
}
|
||||
|
||||
NativeLibrary.LogDeviceInfo();
|
||||
createNotificationChannel();
|
||||
|
||||
databaseHelper = new GameDatabase(this);
|
||||
|
|
|
@ -617,6 +617,11 @@ public final class NativeLibrary {
|
|||
public static native void SaveState(int slot);
|
||||
public static native void LoadState(int slot);
|
||||
|
||||
/**
|
||||
* Logs the Citra version, Android version and, CPU.
|
||||
*/
|
||||
public static native void LogDeviceInfo();
|
||||
|
||||
/**
|
||||
* Button type for use in onTouchEvent
|
||||
*/
|
||||
|
|
|
@ -7,9 +7,11 @@
|
|||
#include <regex>
|
||||
#include <thread>
|
||||
|
||||
#include <android/api-level.h>
|
||||
#include <android/native_window_jni.h>
|
||||
|
||||
#include "audio_core/dsp_interface.h"
|
||||
#include "common/aarch64/cpu_detect.h"
|
||||
#include "common/file_util.h"
|
||||
#include "common/logging/log.h"
|
||||
#include "common/microprofile.h"
|
||||
|
@ -145,7 +147,7 @@ static Core::System::ResultStatus RunCitra(const std::string& filepath) {
|
|||
// Citra core only supports a single running instance
|
||||
std::lock_guard<std::mutex> lock(running_mutex);
|
||||
|
||||
LOG_INFO(Frontend, "Citra is Starting");
|
||||
LOG_INFO(Frontend, "Citra starting...");
|
||||
|
||||
MicroProfileOnThreadCreate("EmuThread");
|
||||
|
||||
|
@ -169,6 +171,7 @@ static Core::System::ResultStatus RunCitra(const std::string& filepath) {
|
|||
GameSettings::LoadOverrides(program_id);
|
||||
}
|
||||
Settings::Apply();
|
||||
Settings::LogSettings();
|
||||
|
||||
Camera::RegisterFactory("image", std::make_unique<Camera::StillImage::Factory>());
|
||||
|
||||
|
@ -193,7 +196,7 @@ static Core::System::ResultStatus RunCitra(const std::string& filepath) {
|
|||
}
|
||||
|
||||
auto& telemetry_session = Core::System::GetInstance().TelemetrySession();
|
||||
telemetry_session.AddField(Common::Telemetry::FieldType::App, "Frontend", "SDL");
|
||||
telemetry_session.AddField(Common::Telemetry::FieldType::App, "Frontend", "Android");
|
||||
|
||||
stop_run = false;
|
||||
pause_emulation = false;
|
||||
|
@ -725,4 +728,13 @@ void Java_org_citra_citra_1emu_NativeLibrary_LoadState(JNIEnv* env, jclass clazz
|
|||
Core::System::GetInstance().SendSignal(Core::System::Signal::Load, slot);
|
||||
}
|
||||
|
||||
void Java_org_citra_citra_1emu_NativeLibrary_LogDeviceInfo(JNIEnv* env, jclass clazz) {
|
||||
// TODO: Log the Common::g_build_fullname once the CI is setup for android
|
||||
LOG_INFO(Frontend, "Citra Version: Android Beta | {}-{}", Common::g_scm_branch,
|
||||
Common::g_scm_desc);
|
||||
LOG_INFO(Frontend, "Host CPU: {}", Common::GetCPUCaps().cpu_string);
|
||||
// There is no decent way to get the OS version, so we log the API level instead.
|
||||
LOG_INFO(Frontend, "Host OS: Android API level {}", android_get_device_api_level());
|
||||
}
|
||||
|
||||
} // extern "C"
|
||||
|
|
|
@ -155,6 +155,9 @@ JNIEXPORT void JNICALL Java_org_citra_citra_1emu_NativeLibrary_SaveState(JNIEnv*
|
|||
JNIEXPORT void JNICALL Java_org_citra_citra_1emu_NativeLibrary_LoadState(JNIEnv* env, jclass clazz,
|
||||
jint slot);
|
||||
|
||||
JNIEXPORT void JNICALL Java_org_citra_citra_1emu_NativeLibrary_LogDeviceInfo(JNIEnv* env,
|
||||
jclass clazz);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
|
Reference in New Issue