mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-04-27 06:48:33 +00:00
Android: Add Default and Clear actions for controllers
This commit is contained in:
parent
ea3200d4ba
commit
8b78f73e80
4 changed files with 52 additions and 0 deletions
|
@ -3,6 +3,7 @@
|
|||
|
||||
#include <jni.h>
|
||||
|
||||
#include "Common/IniFile.h"
|
||||
#include "Core/HW/GCPad.h"
|
||||
#include "Core/HW/Wiimote.h"
|
||||
#include "Core/HW/WiimoteEmu/WiimoteEmu.h"
|
||||
|
@ -71,6 +72,29 @@ Java_org_dolphinemu_dolphinemu_features_input_model_controlleremu_EmulatedContro
|
|||
g_controller_interface, ControlReferenceFromJava(env, control_reference));
|
||||
}
|
||||
|
||||
JNIEXPORT void JNICALL
|
||||
Java_org_dolphinemu_dolphinemu_features_input_model_controlleremu_EmulatedController_loadDefaultSettings(
|
||||
JNIEnv* env, jobject obj)
|
||||
{
|
||||
ControllerEmu::EmulatedController* controller = EmulatedControllerFromJava(env, obj);
|
||||
|
||||
controller->LoadDefaults(g_controller_interface);
|
||||
controller->UpdateReferences(g_controller_interface);
|
||||
}
|
||||
|
||||
JNIEXPORT void JNICALL
|
||||
Java_org_dolphinemu_dolphinemu_features_input_model_controlleremu_EmulatedController_clearSettings(
|
||||
JNIEnv* env, jobject obj)
|
||||
{
|
||||
ControllerEmu::EmulatedController* controller = EmulatedControllerFromJava(env, obj);
|
||||
|
||||
// Loading an empty IniFile section clears everything.
|
||||
IniFile::Section section;
|
||||
|
||||
controller->LoadConfig(§ion);
|
||||
controller->UpdateReferences(g_controller_interface);
|
||||
}
|
||||
|
||||
JNIEXPORT jobject JNICALL
|
||||
Java_org_dolphinemu_dolphinemu_features_input_model_controlleremu_EmulatedController_getGcPad(
|
||||
JNIEnv* env, jclass, jint controller_index)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue