Skip to content

Commit

Permalink
update config
Browse files Browse the repository at this point in the history
  • Loading branch information
zhangwei committed May 27, 2023
1 parent efb9910 commit 899edcc
Show file tree
Hide file tree
Showing 10 changed files with 84 additions and 43 deletions.
1 change: 0 additions & 1 deletion src/android/app/src/main/assets/3dstdb-zh_CN.txt
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,6 @@
00040000000A4D00 = 战国无双 历代记2
000400000014DF00 = 战国无双 历代记3
00040000001A4800 = 永恒绿洲
00040000001A4800 = 永恒绿洲
00040000001A4900 = 永恒绿洲
0004000000113200 = 幻想生活
00040000000E9C00 = 幻想生活 LINK!
Expand Down
84 changes: 46 additions & 38 deletions src/android/app/src/main/assets/config/config-games.ini
Original file line number Diff line number Diff line change
Expand Up @@ -152,44 +152,40 @@
00040000000DF800 // Attack On Titan 1
[cpu_usage_limit]
000400000008FE00 // 1001 Spikes
0004000000120900 // Lord of Magna: Maiden Heaven
0004000000164300 // Lord of Magna: Maiden Heaven
00040000001CCD00 // The Alliance Alive
00040000001B4500 // The Alliance Alive
0004000000053700 // EX Troopers
00040000000BAC00 // Mirror of Fate
000400000009E500 // Mirror of Fate
0004000000096600 // Mirror of Fate
00040000000DCD00 // Mario Golf: World Tour
00040000000A5300 // Mario Golf: World Tour
00040000000DCE00 // Mario Golf: World Tour
0004000000030500 // Super Street Fighter
0004000000032D00 // Super Street Fighter
0004000000033C00 // Super Street Fighter
000400000007A000 // Metal Gear Solid: Snake Eater 3D
0004000000082400 // Metal Gear Solid: Snake Eater 3D
0004000000081E00 // Metal Gear Solid: Snake Eater 3D
00040000000F4E00 // New Love Plus
[cpu_usage_limit1]
000400000F700800 // The Binding of Isaac: Rebirth [USA]
000400000F701700 // The Binding of Isaac: Rebirth [JPN]
000400000F700900 // The Binding of Isaac: Rebirth [EUR]
000400000F705C00 // Futuridium EP Deluxe
[cpu_usage_limit2]
000400000007C700 // Mario Tennis Open
000400000007C800 // Mario Tennis Open
0004000000064D00 // Mario Tennis Open
00040000000B9100 // Mario Tennis Open
00040000000D0000 // Luigi's Mansion: Dark Moon
0004000000076400 // Luigi's Mansion: Dark Moon
0004000000055F00 // Luigi's Mansion: Dark Moon
0004000000076500 // Luigi's Mansion: Dark Moon
0004000000038800 // Shin Megami Tensei: Devil Survivor Overclocked
000400000009C000 // Shin Megami Tensei: Devil Survivor Overclocked
0004000000075100 // Heros of Ruin
000400000008FE00,1,4,2,2 // 1001 Spikes
0004000000120900,1,4,2,2 // Lord of Magna: Maiden Heaven
0004000000164300,1,4,2,2 // Lord of Magna: Maiden Heaven
00040000001CCD00,1,4,2,2 // The Alliance Alive
00040000001B4500,1,4,2,2 // The Alliance Alive
0004000000053700,1,4,2,2 // EX Troopers
00040000000BAC00,1,4,2,2 // Mirror of Fate
000400000009E500,1,4,2,2 // Mirror of Fate
0004000000096600,1,4,2,2 // Mirror of Fate
00040000000DCD00,1,4,2,2 // Mario Golf: World Tour
00040000000A5300,1,4,2,2 // Mario Golf: World Tour
00040000000DCE00,1,4,2,2 // Mario Golf: World Tour
0004000000030500,1,4,2,2 // Super Street Fighter
0004000000032D00,1,4,2,2 // Super Street Fighter
0004000000033C00,1,4,2,2 // Super Street Fighter
000400000007A000,1,4,2,2 // Metal Gear Solid: Snake Eater 3D
0004000000082400,1,4,2,2 // Metal Gear Solid: Snake Eater 3D
0004000000081E00,1,4,2,2 // Metal Gear Solid: Snake Eater 3D
00040000000F4E00,1,4,2,2 // New Love Plus
000400000F700800,1,1,1,1 // The Binding of Isaac: Rebirth [USA]
000400000F701700,1,1,1,1 // The Binding of Isaac: Rebirth [JPN]
000400000F700900,1,1,1,1 // The Binding of Isaac: Rebirth [EUR]
000400000F705C00,1,1,1,1 // Futuridium EP Deluxe
000400000007C700,2,4,2,2 // Mario Tennis Open
000400000007C800,2,4,2,2 // Mario Tennis Open
0004000000064D00,2,4,2,2 // Mario Tennis Open
00040000000B9100,2,4,2,2 // Mario Tennis Open
00040000000D0000,2,4,2,2 // Luigi's Mansion: Dark Moon
0004000000076400,2,4,2,2 // Luigi's Mansion: Dark Moon
0004000000055F00,2,4,2,2 // Luigi's Mansion: Dark Moon
0004000000076500,2,4,2,2 // Luigi's Mansion: Dark Moon
0004000000038800,2,4,2,2 // Shin Megami Tensei: Devil Survivor Overclocked
000400000009C000,2,4,2,2 // Shin Megami Tensei: Devil Survivor Overclocked
0004000000075100,2,4,2,2 // Heros of Ruin
[skip_texture_copy]
0004000000030000 // Kid Icarus: Uprising
Expand Down Expand Up @@ -337,3 +333,15 @@
000400000012E000 // Zombie Panic in Wonderland DX
0004000000167A00 // Zombie Panic in Wonderland DX
00040000000F5600 // Zombie Panic in Wonderland DX
[surface_skip_draw]
000400000F700000,18299400
000400000012DE00,180A6280
00040000001A2B00,18108D00
0004000000166B00,18407B00
000400000016E100,18084800,18080800,1847D400,1849D400
000400000011D700,18084800,18080800,1847D400,1849D400
0004000000197100,18084800,18080800,1847D400,1849D400
0004000000072000,18422000,18412000
0004000000144500,18400100,18404180
00040000001A4800,18025180,1802A700,18024100,18029680,18020080
4 changes: 4 additions & 0 deletions src/android/app/src/main/res/values-es/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
<string name="setting_use_hw_gs">Habilitar sombreador de geometría</string>
<string name="setting_shadow_rendering">Enable Shadow Rendering</string>
<string name="setting_async_shader_compile">Asynchronous Shader Compilation</string>
<string name="setting_use_compatible_mode">Use Compatible Mode</string>
<string name="use_haptic_feedback">Retroalimentación háptica (vibración)</string>
<string name="joystick_relative_center">Centro relativo de uso del joystick</string>
<string name="hide_input_overlay">Ocultar botones virtuales</string>
Expand Down Expand Up @@ -266,6 +267,9 @@
<string name="delete_shader_cache">Eliminar caché de sombreado</string>
<string name="delete_confirm_notice">¿Estás seguro de eliminar el directorio de archivos del juego?</string>

<string name="controller_gamepad">Gamepad</string>
<string name="joystick_range">Joystick Range</string>
<string name="joystick_deadzone">Joystick Deadzone</string>
<string name="controller_stick">Joystick principal</string>
<string name="c_controller_stick">Joystick C</string>
<string name="controller_dpad">D-Pad</string>
Expand Down
4 changes: 4 additions & 0 deletions src/android/app/src/main/res/values-zh/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
<string name="setting_use_hw_gs">启用几何着色器</string>
<string name="setting_shadow_rendering">启用阴影渲染</string>
<string name="setting_async_shader_compile">着色器异步编译</string>
<string name="setting_use_compatible_mode">使用兼容模式</string>
<string name="use_haptic_feedback">按键反馈(震动)</string>
<string name="joystick_relative_center">摇杆使用相对位置</string>
<string name="hide_input_overlay">隐藏屏幕按键</string>
Expand Down Expand Up @@ -266,6 +267,9 @@
<string name="delete_shader_cache">删除着色器缓存</string>
<string name="delete_confirm_notice">确定删除游戏安装目录?</string>

<string name="controller_gamepad">手柄</string>
<string name="joystick_range">摇杆范围</string>
<string name="joystick_deadzone">摇杆死区</string>
<string name="controller_stick">主摇杆</string>
<string name="c_controller_stick">C 摇杆</string>
<string name="controller_dpad">方向键</string>
Expand Down
4 changes: 4 additions & 0 deletions src/android/app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
<string name="setting_use_hw_gs">Enable Geometry Shader</string>
<string name="setting_shadow_rendering">Enable Shadow Rendering</string>
<string name="setting_async_shader_compile">Asynchronous Shader Compilation</string>
<string name="setting_use_compatible_mode">Use Compatible Mode</string>
<string name="use_haptic_feedback">Haptic Feedback (Vibration)</string>
<string name="joystick_relative_center">Joystick use relative center</string>
<string name="hide_input_overlay">Hide Input Buttons</string>
Expand Down Expand Up @@ -266,6 +267,9 @@
<string name="delete_shader_cache">Delete Shader Cache</string>
<string name="delete_confirm_notice">Are you sure to delete the game install directory?</string>

<string name="controller_gamepad">Gamepad</string>
<string name="joystick_range">Joystick Range</string>
<string name="joystick_deadzone">Joystick Deadzone</string>
<string name="controller_stick">Main Stick</string>
<string name="c_controller_stick">C Stick</string>
<string name="controller_dpad">D-Pad</string>
Expand Down
2 changes: 1 addition & 1 deletion src/android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ buildscript {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:8.0.0'
classpath 'com.android.tools.build:gradle:8.0.2'

// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
Expand Down
9 changes: 8 additions & 1 deletion src/android/jni/config/main_settings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ const ConfigInfo<std::string> CAMERA_DEVICE{{"Camera", "camera_type"}, "blank"};
const ConfigInfo<bool> USE_HW_GS{{"Debug", "use_hw_gs"}, false};
const ConfigInfo<u8> SHADER_TYPE{{"Debug", "shader_type"}, 1};
const ConfigInfo<bool> ASYNC_SHADER_COMPILE{{"Debug", "async_shader_compile"}, false};
const ConfigInfo<bool> USE_COMPATIBLE_MODE{{"Debug", "use_compatible_mode"}, false};
const ConfigInfo<bool> USE_PRESENT_THREAD{{"Debug", "use_present_thread"}, true};
const ConfigInfo<bool> SHADOW_RENDERING{{"Debug", "shadow_rendering"}, true};
const ConfigInfo<bool> CPU_USAGE_LIMIT{{"Debug", "cpu_usage_limit"}, false};
Expand Down Expand Up @@ -97,9 +98,15 @@ const ConfigInfo<u16> INPUT_OVERLAY_SCALE{{"Controls", "input_overlay_scale"}, 4
const ConfigInfo<bool> INPUT_OVERLAY_FEEDBACK{{"Controls", "input_overlay_feedback"}, true};
const ConfigInfo<bool> INPUT_OVERLAY_HIDE{{"Controls", "input_overlay_hide"}, false};
const ConfigInfo<bool> INPUT_JOYSTICK_RELATIVE{{"Controls", "input_joystick_relative"}, true};
const ConfigInfo<u32> INPUT_JOYSTICK_RANGE{{"Controls", "input_joystick_range"}, 100};
const ConfigInfo<u32> INPUT_JOYSTICK_DEADZONE{{"Controls", "input_joystick_deadzone"}, 0};

// custom layout
const ConfigInfo<bool> USE_CUSTOM_LAYOUT{{"Layout", "custom_layout"}, false};
const ConfigInfo<bool> PORTRAIT_CUSTOM_LAYOUT{{"Layout", "portrait_custom_layout"}, false};
const ConfigInfo<bool> LANDSCAPE_CUSTOM_LAYOUT{{"Layout", "landscape_custom_layout"}, false};

const ConfigInfo<bool> PORTRAIT_SWAP_SCREEN{{"Layout", "portrait_swap_screen"}, false};
const ConfigInfo<bool> LANDSCAPE_SWAP_SCREEN{{"Layout", "landscape_swap_screen"}, false};

const ConfigInfo<u16> PORTRAIT_TOP_LEFT{{"Layout", "portrait_top_left"}, 0};
const ConfigInfo<u16> PORTRAIT_TOP_TOP{{"Layout", "portrait_top_top"}, 0};
Expand Down
9 changes: 8 additions & 1 deletion src/android/jni/config/main_settings.h
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ extern const ConfigInfo<std::string> CAMERA_DEVICE;
extern const ConfigInfo<bool> USE_HW_GS;
extern const ConfigInfo<u8> SHADER_TYPE;
extern const ConfigInfo<bool> ASYNC_SHADER_COMPILE;
extern const ConfigInfo<bool> USE_COMPATIBLE_MODE;
extern const ConfigInfo<bool> USE_PRESENT_THREAD;
extern const ConfigInfo<bool> SHADOW_RENDERING;
extern const ConfigInfo<bool> CPU_USAGE_LIMIT;
Expand Down Expand Up @@ -99,9 +100,15 @@ extern const ConfigInfo<u16> INPUT_OVERLAY_SCALE;
extern const ConfigInfo<bool> INPUT_OVERLAY_FEEDBACK;
extern const ConfigInfo<bool> INPUT_OVERLAY_HIDE;
extern const ConfigInfo<bool> INPUT_JOYSTICK_RELATIVE;
extern const ConfigInfo<u32> INPUT_JOYSTICK_RANGE;
extern const ConfigInfo<u32> INPUT_JOYSTICK_DEADZONE;

// custom layout
extern const ConfigInfo<bool> USE_CUSTOM_LAYOUT;
extern const ConfigInfo<bool> PORTRAIT_CUSTOM_LAYOUT;
extern const ConfigInfo<bool> LANDSCAPE_CUSTOM_LAYOUT;

extern const ConfigInfo<bool> PORTRAIT_SWAP_SCREEN;
extern const ConfigInfo<bool> LANDSCAPE_SWAP_SCREEN;

extern const ConfigInfo<u16> PORTRAIT_TOP_LEFT;
extern const ConfigInfo<u16> PORTRAIT_TOP_TOP;
Expand Down
9 changes: 8 additions & 1 deletion src/android/jni/main_android.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -253,6 +253,8 @@ static void UpdateDisplayRotation() {
Settings::values.custom_bottom_top = Config::Get(Config::PORTRAIT_BOTTOM_TOP);
Settings::values.custom_bottom_right = Config::Get(Config::PORTRAIT_BOTTOM_RIGHT);
Settings::values.custom_bottom_bottom = Config::Get(Config::PORTRAIT_BOTTOM_BOTTOM);
Settings::values.custom_layout = Config::Get(Config::PORTRAIT_CUSTOM_LAYOUT);
Settings::values.swap_screen = Config::Get(Config::PORTRAIT_SWAP_SCREEN);
} else {
Settings::values.layout_option = Config::Get(Config::LANDSCAPE_LAYOUT_OPTION);
Settings::values.custom_top_left = Config::Get(Config::LANDSCAPE_TOP_LEFT);
Expand All @@ -263,6 +265,8 @@ static void UpdateDisplayRotation() {
Settings::values.custom_bottom_top = Config::Get(Config::LANDSCAPE_BOTTOM_TOP);
Settings::values.custom_bottom_right = Config::Get(Config::LANDSCAPE_BOTTOM_RIGHT);
Settings::values.custom_bottom_bottom = Config::Get(Config::LANDSCAPE_BOTTOM_BOTTOM);
Settings::values.custom_layout = Config::Get(Config::LANDSCAPE_CUSTOM_LAYOUT);
Settings::values.swap_screen = Config::Get(Config::LANDSCAPE_SWAP_SCREEN);
}
}

Expand Down Expand Up @@ -641,7 +645,6 @@ JNIEXPORT void JNICALL Java_org_citra_emu_NativeLibrary_setCustomLayout(JNIEnv*
jint left, jint top,
jint right, jint bottom) {
Settings::values.custom_layout = true;
Config::Set(Config::USE_CUSTOM_LAYOUT, true);
if (is_top_screen) {
Settings::values.custom_top_left = left;
Settings::values.custom_top_top = top;
Expand All @@ -653,11 +656,13 @@ JNIEXPORT void JNICALL Java_org_citra_emu_NativeLibrary_setCustomLayout(JNIEnv*
Config::Set(Config::PORTRAIT_TOP_TOP, top);
Config::Set(Config::PORTRAIT_TOP_RIGHT, right);
Config::Set(Config::PORTRAIT_TOP_BOTTOM, bottom);
Config::Set(Config::PORTRAIT_CUSTOM_LAYOUT, true);
} else {
Config::Set(Config::LANDSCAPE_TOP_LEFT, left);
Config::Set(Config::LANDSCAPE_TOP_TOP, top);
Config::Set(Config::LANDSCAPE_TOP_RIGHT, right);
Config::Set(Config::LANDSCAPE_TOP_BOTTOM, bottom);
Config::Set(Config::LANDSCAPE_CUSTOM_LAYOUT, true);
}
} else {
Settings::values.custom_bottom_left = left;
Expand All @@ -670,11 +675,13 @@ JNIEXPORT void JNICALL Java_org_citra_emu_NativeLibrary_setCustomLayout(JNIEnv*
Config::Set(Config::PORTRAIT_BOTTOM_TOP, top);
Config::Set(Config::PORTRAIT_BOTTOM_RIGHT, right);
Config::Set(Config::PORTRAIT_BOTTOM_BOTTOM, bottom);
Config::Set(Config::PORTRAIT_CUSTOM_LAYOUT, true);
} else {
Config::Set(Config::LANDSCAPE_BOTTOM_LEFT, left);
Config::Set(Config::LANDSCAPE_BOTTOM_TOP, top);
Config::Set(Config::LANDSCAPE_BOTTOM_RIGHT, right);
Config::Set(Config::LANDSCAPE_BOTTOM_BOTTOM, bottom);
Config::Set(Config::LANDSCAPE_CUSTOM_LAYOUT, true);
}
}
s_render_window->UpdateLayout();
Expand Down
1 change: 1 addition & 0 deletions src/core/settings.h
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,7 @@ struct Values {
bool use_hw_gs;
bool accurate_max_min;
bool accurate_rcp_rsq;
bool use_compatible_mode;
SharedFontType shared_font_type;
AccurateMul shaders_accurate_mul;
std::string remote_shader_host;
Expand Down

0 comments on commit 899edcc

Please sign in to comment.