Skip to content

Commit

Permalink
fx
Browse files Browse the repository at this point in the history
  • Loading branch information
weihuoya committed Oct 9, 2022
1 parent b28b2e6 commit 67b4a0d
Show file tree
Hide file tree
Showing 16 changed files with 86 additions and 92 deletions.
8 changes: 4 additions & 4 deletions src/android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -78,13 +78,13 @@ android {

dependencies {
implementation 'androidx.appcompat:appcompat:1.4.0'
implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.1.+'
implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.1.0'
implementation 'androidx.recyclerview:recyclerview:1.2.1'
implementation "androidx.preference:preference:1.1.+"
implementation "androidx.core:core-google-shortcuts:1.0.+"
implementation "androidx.preference:preference:1.1.1"
implementation "androidx.core:core-google-shortcuts:1.0.1"
implementation 'androidx.viewpager2:viewpager2:1.0.0'
implementation 'com.google.android.material:material:1.4.0'
implementation 'androidx.documentfile:documentfile:1.0.+'
implementation 'androidx.documentfile:documentfile:1.0.1'
}

def getVersion() {
Expand Down
2 changes: 1 addition & 1 deletion src/android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@
android:resource="@xml/nnf_provider_paths" />
</provider>
<provider
android:name="org.citra.emu.UserPathProvider"
android:name=".UserPathProvider"
android:authorities="${applicationId}.userpathprovider"
android:exported="true"
android:grantUriPermissions="true"
Expand Down
7 changes: 7 additions & 0 deletions src/android/app/src/main/assets/3dstdb-zh_CN.txt
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
000400000006CC00 = 皇牌空战 突击地平线
0004000000064900 = 皇牌空战 突击地平线
00040000000F4E00 = 新爱相随+
00040000001A7400 = 实况力量棒球英雄
0004000000030000 = 新光之神话 帕鲁迪娜之镜
0004000000030100 = 新光之神话 帕鲁迪娜之镜
0004000000030200 = 新光之神话 帕鲁迪娜之镜
Expand All @@ -45,6 +46,12 @@
0004000000884800 = 仙剑奇侠传
0004000000198500 = 金庸群侠传
0004000000190B00 = 沙漠老鼠团
000400000004A100 = 洞窟物语
000400000004D200 = 洞窟物语
0004000000084C00 = 洞窟物语
0004000000040500 = 雷神
0004000000075100 = 毁灭英雄
0004000000038C00 = 乐高星球大战3 克隆战争
0004000000120800 = 海岛之日
00040000001ACD00 = 勇气地牢
00040000000CD300 = 时光复仇者
Expand Down
14 changes: 14 additions & 0 deletions src/android/app/src/main/assets/config/config-games.ini
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@
0004000000095700 // Art Academy: Lessons for Everyone
0004000000095800 // Art Academy: Lessons for Everyone
0004000000084F00 // Art Academy: Lessons for Everyone
000400000F705C00 // Futuridium EP Deluxe
[use_linear_filter]
00040000001AA200 // Attack On Titan 2
Expand Down Expand Up @@ -159,11 +160,13 @@
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
Expand All @@ -174,6 +177,9 @@
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
[skip_texture_copy]
0004000000030000 // Kid Icarus: Uprising
Expand All @@ -196,6 +202,14 @@
0004000000031F00 // Professor Layton and the Miracle Mask
00040000000C9200 // Professor Layton and the Miracle Mask Plus
[skip_load_buffer]
000400000016E300 // Metroid Prime: Federation Force
000400000016CE00 // Metroid Prime: Federation Force
0004000000175200 // Metroid Prime: Federation Force
[merge_framebuffer]
[skip_slow_draw]
000400000015CB00 // New Atelier Rorona
000400000018E900 // My Hero Academia
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,7 @@ public View onCreateView(LayoutInflater inflater, ViewGroup container,
mBtnDone.setOnClickListener(v -> {
stopConfiguringControls();
stopConfiguringLayout();
mInputOverlay.onPressedFeedback();
});

mChatLayout = contents.findViewById(R.id.chat_input);
Expand Down
20 changes: 6 additions & 14 deletions src/android/app/src/main/res/layout-land/activity_memory.xml
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,7 @@

<LinearLayout
android:orientation="horizontal"
android:paddingTop="6dp"
android:paddingBottom="4dp"
android:paddingTop="10dp"
android:layout_width="match_parent"
android:layout_height="wrap_content">

Expand Down Expand Up @@ -60,37 +59,33 @@
<TextView
android:text="@string/memory_region_start"
android:textSize="16sp"
android:layout_weight="4"
android:paddingStart="4dp"
android:layout_width="match_parent"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>

<EditText
android:id="@+id/edit_region_start"
android:layout_weight="3"
android:layout_weight="1"
android:layout_width="match_parent"
android:layout_height="wrap_content"/>

<TextView
android:text="@string/memory_region_stop"
android:textSize="16sp"
android:layout_weight="4"
android:paddingStart="4dp"
android:layout_width="match_parent"
android:paddingStart="8dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>

<EditText
android:id="@+id/edit_region_stop"
android:layout_weight="3"
android:layout_weight="1"
android:layout_width="match_parent"
android:layout_height="wrap_content"/>

</LinearLayout>

<LinearLayout
android:orientation="horizontal"
android:paddingTop="10dp"
android:paddingBottom="10dp"
android:layout_width="match_parent"
android:layout_height="wrap_content">

Expand All @@ -113,7 +108,6 @@
<LinearLayout
android:orientation="horizontal"
android:paddingTop="10dp"
android:paddingBottom="10dp"
android:layout_width="match_parent"
android:layout_height="wrap_content">

Expand Down Expand Up @@ -157,7 +151,6 @@

<LinearLayout
android:orientation="horizontal"
android:paddingTop="6dp"
android:layout_width="match_parent"
android:layout_height="wrap_content">

Expand Down Expand Up @@ -187,7 +180,6 @@

<LinearLayout
android:orientation="horizontal"
android:paddingTop="6dp"
android:layout_width="match_parent"
android:layout_height="wrap_content">

Expand Down
1 change: 1 addition & 0 deletions src/android/app/src/main/res/layout/activity_editor.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
android:textColor="@android:color/darker_gray"
android:text="ID:00040000000AFD00"
android:textSize="14sp"
android:textIsSelectable="true"
android:paddingTop="10dp"
android:paddingBottom="4dp"
android:layout_below="@id/toolbar"
Expand Down
2 changes: 2 additions & 0 deletions src/android/app/src/main/res/layout/activity_main.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@
android:id="@+id/tabs_main"
android:background="?attr/colorPrimary"
app:tabBackground="?attr/colorPrimary"
app:tabMaxWidth="0dp"
app:tabGravity="fill"
android:layout_width="match_parent"
android:layout_height="wrap_content" />

Expand Down
20 changes: 6 additions & 14 deletions src/android/app/src/main/res/layout/activity_memory.xml
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,7 @@

<LinearLayout
android:orientation="horizontal"
android:paddingTop="6dp"
android:paddingBottom="4dp"
android:paddingTop="10dp"
android:layout_width="match_parent"
android:layout_height="wrap_content">

Expand Down Expand Up @@ -58,37 +57,33 @@
<TextView
android:text="@string/memory_region_start"
android:textSize="16sp"
android:layout_weight="4"
android:paddingStart="4dp"
android:layout_width="match_parent"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>

<EditText
android:id="@+id/edit_region_start"
android:layout_weight="3"
android:layout_weight="1"
android:layout_width="match_parent"
android:layout_height="wrap_content"/>

<TextView
android:text="@string/memory_region_stop"
android:textSize="16sp"
android:layout_weight="4"
android:paddingStart="4dp"
android:layout_width="match_parent"
android:paddingStart="8dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>

<EditText
android:id="@+id/edit_region_stop"
android:layout_weight="3"
android:layout_weight="1"
android:layout_width="match_parent"
android:layout_height="wrap_content"/>

</LinearLayout>

<LinearLayout
android:orientation="horizontal"
android:paddingTop="10dp"
android:paddingBottom="10dp"
android:layout_width="match_parent"
android:layout_height="wrap_content">

Expand All @@ -111,7 +106,6 @@
<LinearLayout
android:orientation="horizontal"
android:paddingTop="10dp"
android:paddingBottom="10dp"
android:layout_width="match_parent"
android:layout_height="wrap_content">

Expand Down Expand Up @@ -155,7 +149,6 @@

<LinearLayout
android:orientation="horizontal"
android:paddingTop="6dp"
android:layout_width="match_parent"
android:layout_height="wrap_content">

Expand Down Expand Up @@ -185,7 +178,6 @@

<LinearLayout
android:orientation="horizontal"
android:paddingTop="6dp"
android:layout_width="match_parent"
android:layout_height="wrap_content">

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:7.2.2'
classpath 'com.android.tools.build:gradle:7.3.0'

// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
Expand Down
2 changes: 1 addition & 1 deletion src/android/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.3-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-bin.zip
2 changes: 2 additions & 0 deletions src/android/jni/main_android.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -444,6 +444,8 @@ JNIEXPORT void JNICALL Java_org_citra_emu_NativeLibrary_Run(JNIEnv* env, jclass
Settings::values.use_direct_display = true;
Settings::values.accurate_max_min = false;
Settings::values.accurate_rcp_rsq = false;
Settings::values.skip_load_buffer = false;
Settings::values.merge_framebuffer = false;
Settings::values.use_hw_gs = Config::Get(Config::USE_HW_GS);
Settings::values.use_gles = Config::Get(Config::USE_GLES);
Settings::values.show_fps = Config::Get(Config::SHOW_FPS);
Expand Down
12 changes: 7 additions & 5 deletions src/core/file_sys/disk_archive.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
#include <memory>
#include "common/common_types.h"
#include "common/file_util.h"
#include "common/string_util.h"
#include "common/logging/log.h"
#include "core/file_sys/disk_archive.h"
#include "core/file_sys/errors.h"
Expand Down Expand Up @@ -64,16 +65,17 @@ u32 DiskDirectory::Read(const u32 count, Entry* entries) {
u32 entries_read = 0;

while (entries_read < count && children_iterator != directory.children.cend()) {
const FileUtil::FSTEntry& file = *children_iterator;
const std::string& filename = file.virtualName;
Entry& entry = entries[entries_read];
const auto& file = *children_iterator;
const auto& filename = file.virtualName;
const auto& filename16 = Common::UTF8ToUTF16(filename);
auto& entry = entries[entries_read];

LOG_TRACE(Service_FS, "File {}: size={} dir={}", filename, file.size, file.isDirectory);

// TODO(Link Mauve): use a proper conversion to UTF-16.
for (std::size_t j = 0; j < FILENAME_LENGTH; ++j) {
entry.filename[j] = filename[j];
if (!filename[j])
entry.filename[j] = filename16[j];
if (!filename16[j])
break;
}

Expand Down
3 changes: 0 additions & 3 deletions src/core/frontend/emu_window.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -104,9 +104,6 @@ void EmuWindow::TouchMoved(unsigned framebuffer_x, unsigned framebuffer_y) {
}

void EmuWindow::UpdateFramebufferLayout(u32 width, u32 height) {
ASSERT(width > 0);
ASSERT(height > 0);

Layout::FramebufferLayout layout;
if (Settings::values.custom_layout) {
layout = Layout::CustomFrameLayout(width, height);
Expand Down
Loading

0 comments on commit 67b4a0d

Please sign in to comment.