diff options
| author | JosJuice <josjuice@gmail.com> | 2021-05-20 16:34:30 +0200 |
|---|---|---|
| committer | JosJuice <josjuice@gmail.com> | 2021-05-20 16:43:03 +0200 |
| commit | b7ba126db0d796348ba884333b341e50252433ad (patch) | |
| tree | dec3ad31f3a48b269232ff98f3b1a5521fddc3c7 /Source/Android/jni/Config/PostProcessing.cpp | |
| parent | ece32247159c1a78d44a36779d121a8580d06289 (diff) | |
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.
Diffstat (limited to 'Source/Android/jni/Config/PostProcessing.cpp')
| -rw-r--r-- | Source/Android/jni/Config/PostProcessing.cpp | 35 |
1 files changed, 35 insertions, 0 deletions
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 <string> +#include <vector> + +#include <jni.h> + +#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()); +} +} |
