mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-06-15 06:58:37 +02:00
Android: Enfore correct stick gate in overlay
Currently, the touch controller overlay uses a square gate for sticks. This commit changes that so that it instead uses the stick gate configured in the INI, which ensures that the values sent to the core are appropriately scaled regardless of what is configured in the INI and makes the overlay look nicer if the INI is set to a stick gate that matches the graphics.
This commit is contained in:
@ -201,6 +201,8 @@ JNIEXPORT void JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_onGamePadMov
|
||||
JNIEnv* env, jobject obj, jstring jDevice, jint Axis, jfloat Value);
|
||||
JNIEXPORT void JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_SetMotionSensorsEnabled(
|
||||
JNIEnv* env, jobject obj, jboolean accelerometer_enabled, jboolean gyroscope_enabled);
|
||||
JNIEXPORT double JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_GetInputRadiusAtAngle(
|
||||
JNIEnv* env, jobject obj, int emu_pad_id, int stick, double angle);
|
||||
JNIEXPORT jstring JNICALL
|
||||
Java_org_dolphinemu_dolphinemu_NativeLibrary_GetVersionString(JNIEnv* env, jobject obj);
|
||||
JNIEXPORT jstring JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_GetGitRevision(JNIEnv* env,
|
||||
@ -315,6 +317,13 @@ JNIEXPORT void JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_SetMotionSen
|
||||
ciface::Android::SetMotionSensorsEnabled(accelerometer_enabled, gyroscope_enabled);
|
||||
}
|
||||
|
||||
JNIEXPORT double JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_GetInputRadiusAtAngle(
|
||||
JNIEnv* env, jobject obj, int emu_pad_id, int stick, double angle)
|
||||
{
|
||||
const auto casted_stick = static_cast<ButtonManager::ButtonType>(stick);
|
||||
return ButtonManager::GetInputRadiusAtAngle(emu_pad_id, casted_stick, angle);
|
||||
}
|
||||
|
||||
JNIEXPORT jstring JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_GetVersionString(JNIEnv* env,
|
||||
jobject obj)
|
||||
{
|
||||
|
Reference in New Issue
Block a user