From b7ba126db0d796348ba884333b341e50252433ad Mon Sep 17 00:00:00 2001 From: JosJuice Date: Thu, 20 May 2021 16:34:30 +0200 Subject: Android: Use JNI for getting post-processsing shaders The Java implementation of getting the list of post-processing shaders only looked in the Sys folder and not the User folder. This could be fixed in the Java implementation, but it's simpler to just call the C++ implementation instead. --- Source/Android/jni/Config/PostProcessing.cpp | 35 ++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 Source/Android/jni/Config/PostProcessing.cpp (limited to 'Source/Android/jni/Config/PostProcessing.cpp') diff --git a/Source/Android/jni/Config/PostProcessing.cpp b/Source/Android/jni/Config/PostProcessing.cpp new file mode 100644 index 0000000000..a96afca1a7 --- /dev/null +++ b/Source/Android/jni/Config/PostProcessing.cpp @@ -0,0 +1,35 @@ +// Copyright 2021 Dolphin Emulator Project +// Licensed under GPLv2+ +// Refer to the license.txt file included. + +#include +#include + +#include + +#include "VideoCommon/PostProcessing.cpp" +#include "jni/AndroidCommon/AndroidCommon.h" + +extern "C" { + +JNIEXPORT jobjectArray JNICALL +Java_org_dolphinemu_dolphinemu_features_settings_model_PostProcessing_getShaderList(JNIEnv* env, + jclass) +{ + return VectorToJStringArray(env, VideoCommon::PostProcessing::GetShaderList()); +} + +JNIEXPORT jobjectArray JNICALL +Java_org_dolphinemu_dolphinemu_features_settings_model_PostProcessing_getAnaglyphShaderList( + JNIEnv* env, jclass) +{ + return VectorToJStringArray(env, VideoCommon::PostProcessing::GetAnaglyphShaderList()); +} + +JNIEXPORT jobjectArray JNICALL +Java_org_dolphinemu_dolphinemu_features_settings_model_PostProcessing_getPassiveShaderList( + JNIEnv* env, jclass) +{ + return VectorToJStringArray(env, VideoCommon::PostProcessing::GetPassiveShaderList()); +} +} -- cgit v1.2.3