diff --git a/include/emulator.hpp b/include/emulator.hpp index a668d6c11..abb74089b 100644 --- a/include/emulator.hpp +++ b/include/emulator.hpp @@ -66,7 +66,6 @@ class Emulator { #ifdef PANDA3DS_ENABLE_DISCORD_RPC Discord::RPC discordRpc; #endif - void setAudioEnabled(bool enable); void updateDiscord(); // Keep the handle for the ROM here to reload when necessary and to prevent deleting it @@ -99,6 +98,7 @@ class Emulator { void resume(); // Resume the emulator void pause(); // Pause the emulator void togglePause(); + void setAudioEnabled(bool enable); bool loadAmiibo(const std::filesystem::path& path); bool loadROM(const std::filesystem::path& path); diff --git a/src/jni_driver.cpp b/src/jni_driver.cpp index fbfae8ffd..60bbc6806 100644 --- a/src/jni_driver.cpp +++ b/src/jni_driver.cpp @@ -48,6 +48,11 @@ MAKE_SETTING(setAccurateShaderMulEnable, jboolean, accurateShaderMul) #undef MAKE_SETTING +AlberFunction(void, setAudioEnabled)(JNIEnv* env, jobject obj, jboolean value) { + emulator->getConfig().audioEnabled = value; + emulator->setAudioEnabled(value); +} + AlberFunction(void, Setup)(JNIEnv* env, jobject obj) { env->GetJavaVM(&jvm);