early-access version 3700
This commit is contained in:
parent
e69574bd30
commit
1cef263bd0
7 changed files with 141 additions and 79 deletions
|
@ -1,7 +1,7 @@
|
||||||
yuzu emulator early access
|
yuzu emulator early access
|
||||||
=============
|
=============
|
||||||
|
|
||||||
This is the source code for early-access 3699.
|
This is the source code for early-access 3700.
|
||||||
|
|
||||||
## Legal Notice
|
## Legal Notice
|
||||||
|
|
||||||
|
|
4
externals/nx_tzdb/CMakeLists.txt
vendored
4
externals/nx_tzdb/CMakeLists.txt
vendored
|
@ -7,7 +7,7 @@ add_library(nx_tzdb INTERFACE)
|
||||||
|
|
||||||
find_program(GIT git)
|
find_program(GIT git)
|
||||||
find_program(GNU_MAKE make)
|
find_program(GNU_MAKE make)
|
||||||
find_program(GNU_DATE date)
|
find_program(DATE_PROG date)
|
||||||
|
|
||||||
set(CAN_BUILD_NX_TZDB true)
|
set(CAN_BUILD_NX_TZDB true)
|
||||||
|
|
||||||
|
@ -17,7 +17,7 @@ endif()
|
||||||
if (NOT GNU_MAKE)
|
if (NOT GNU_MAKE)
|
||||||
set(CAN_BUILD_NX_TZDB false)
|
set(CAN_BUILD_NX_TZDB false)
|
||||||
endif()
|
endif()
|
||||||
if (NOT GNU_DATE)
|
if (NOT DATE_PROG)
|
||||||
set(CAN_BUILD_NX_TZDB false)
|
set(CAN_BUILD_NX_TZDB false)
|
||||||
endif()
|
endif()
|
||||||
if (CMAKE_SYSTEM_NAME STREQUAL "Windows" OR ANDROID)
|
if (CMAKE_SYSTEM_NAME STREQUAL "Windows" OR ANDROID)
|
||||||
|
|
|
@ -68,79 +68,109 @@ class HomeSettingsFragment : Fragment() {
|
||||||
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
||||||
mainActivity = requireActivity() as MainActivity
|
mainActivity = requireActivity() as MainActivity
|
||||||
|
|
||||||
val optionsList: MutableList<HomeSetting> = mutableListOf(
|
val optionsList: MutableList<HomeSetting> = mutableListOf<HomeSetting>().apply {
|
||||||
HomeSetting(
|
add(
|
||||||
R.string.advanced_settings,
|
HomeSetting(
|
||||||
R.string.settings_description,
|
R.string.advanced_settings,
|
||||||
R.drawable.ic_settings
|
R.string.settings_description,
|
||||||
) { SettingsActivity.launch(requireContext(), SettingsFile.FILE_NAME_CONFIG, "") },
|
R.drawable.ic_settings
|
||||||
HomeSetting(
|
) { SettingsActivity.launch(requireContext(), SettingsFile.FILE_NAME_CONFIG, "") }
|
||||||
R.string.open_user_folder,
|
)
|
||||||
R.string.open_user_folder_description,
|
add(
|
||||||
R.drawable.ic_folder_open
|
HomeSetting(
|
||||||
) { openFileManager() },
|
R.string.open_user_folder,
|
||||||
HomeSetting(
|
R.string.open_user_folder_description,
|
||||||
R.string.preferences_theme,
|
R.drawable.ic_folder_open
|
||||||
R.string.theme_and_color_description,
|
) { openFileManager() }
|
||||||
R.drawable.ic_palette
|
)
|
||||||
) { SettingsActivity.launch(requireContext(), Settings.SECTION_THEME, "") },
|
add(
|
||||||
HomeSetting(
|
HomeSetting(
|
||||||
R.string.install_gpu_driver,
|
R.string.preferences_theme,
|
||||||
R.string.install_gpu_driver_description,
|
R.string.theme_and_color_description,
|
||||||
R.drawable.ic_exit
|
R.drawable.ic_palette
|
||||||
) { driverInstaller() },
|
) { SettingsActivity.launch(requireContext(), Settings.SECTION_THEME, "") }
|
||||||
HomeSetting(
|
)
|
||||||
R.string.install_amiibo_keys,
|
|
||||||
R.string.install_amiibo_keys_description,
|
if (GpuDriverHelper.supportsCustomDriverLoading()) {
|
||||||
R.drawable.ic_nfc
|
add(
|
||||||
) { mainActivity.getAmiiboKey.launch(arrayOf("*/*")) },
|
HomeSetting(
|
||||||
HomeSetting(
|
R.string.install_gpu_driver,
|
||||||
R.string.install_game_content,
|
R.string.install_gpu_driver_description,
|
||||||
R.string.install_game_content_description,
|
R.drawable.ic_exit
|
||||||
R.drawable.ic_system_update_alt
|
) { driverInstaller() }
|
||||||
) { mainActivity.installGameUpdate.launch(arrayOf("*/*")) },
|
|
||||||
HomeSetting(
|
|
||||||
R.string.select_games_folder,
|
|
||||||
R.string.select_games_folder_description,
|
|
||||||
R.drawable.ic_add
|
|
||||||
) {
|
|
||||||
mainActivity.getGamesDirectory.launch(Intent(Intent.ACTION_OPEN_DOCUMENT_TREE).data)
|
|
||||||
},
|
|
||||||
HomeSetting(
|
|
||||||
R.string.manage_save_data,
|
|
||||||
R.string.import_export_saves_description,
|
|
||||||
R.drawable.ic_save
|
|
||||||
) {
|
|
||||||
ImportExportSavesFragment().show(
|
|
||||||
parentFragmentManager,
|
|
||||||
ImportExportSavesFragment.TAG
|
|
||||||
)
|
)
|
||||||
},
|
|
||||||
HomeSetting(
|
|
||||||
R.string.install_prod_keys,
|
|
||||||
R.string.install_prod_keys_description,
|
|
||||||
R.drawable.ic_unlock
|
|
||||||
) { mainActivity.getProdKey.launch(arrayOf("*/*")) },
|
|
||||||
HomeSetting(
|
|
||||||
R.string.install_firmware,
|
|
||||||
R.string.install_firmware_description,
|
|
||||||
R.drawable.ic_firmware
|
|
||||||
) { mainActivity.getFirmware.launch(arrayOf("application/zip")) },
|
|
||||||
HomeSetting(
|
|
||||||
R.string.share_log,
|
|
||||||
R.string.share_log_description,
|
|
||||||
R.drawable.ic_log
|
|
||||||
) { shareLog() },
|
|
||||||
HomeSetting(
|
|
||||||
R.string.about,
|
|
||||||
R.string.about_description,
|
|
||||||
R.drawable.ic_info_outline
|
|
||||||
) {
|
|
||||||
exitTransition = MaterialSharedAxis(MaterialSharedAxis.X, true)
|
|
||||||
parentFragmentManager.primaryNavigationFragment?.findNavController()
|
|
||||||
?.navigate(R.id.action_homeSettingsFragment_to_aboutFragment)
|
|
||||||
}
|
}
|
||||||
)
|
|
||||||
|
add(
|
||||||
|
HomeSetting(
|
||||||
|
R.string.install_amiibo_keys,
|
||||||
|
R.string.install_amiibo_keys_description,
|
||||||
|
R.drawable.ic_nfc
|
||||||
|
) { mainActivity.getAmiiboKey.launch(arrayOf("*/*")) }
|
||||||
|
)
|
||||||
|
add(
|
||||||
|
HomeSetting(
|
||||||
|
R.string.install_game_content,
|
||||||
|
R.string.install_game_content_description,
|
||||||
|
R.drawable.ic_system_update_alt
|
||||||
|
) { mainActivity.installGameUpdate.launch(arrayOf("*/*")) }
|
||||||
|
)
|
||||||
|
add(
|
||||||
|
HomeSetting(
|
||||||
|
R.string.select_games_folder,
|
||||||
|
R.string.select_games_folder_description,
|
||||||
|
R.drawable.ic_add
|
||||||
|
) {
|
||||||
|
mainActivity.getGamesDirectory.launch(
|
||||||
|
Intent(Intent.ACTION_OPEN_DOCUMENT_TREE).data
|
||||||
|
)
|
||||||
|
}
|
||||||
|
)
|
||||||
|
add(
|
||||||
|
HomeSetting(
|
||||||
|
R.string.manage_save_data,
|
||||||
|
R.string.import_export_saves_description,
|
||||||
|
R.drawable.ic_save
|
||||||
|
) {
|
||||||
|
ImportExportSavesFragment().show(
|
||||||
|
parentFragmentManager,
|
||||||
|
ImportExportSavesFragment.TAG
|
||||||
|
)
|
||||||
|
}
|
||||||
|
)
|
||||||
|
add(
|
||||||
|
HomeSetting(
|
||||||
|
R.string.install_prod_keys,
|
||||||
|
R.string.install_prod_keys_description,
|
||||||
|
R.drawable.ic_unlock
|
||||||
|
) { mainActivity.getProdKey.launch(arrayOf("*/*")) }
|
||||||
|
)
|
||||||
|
add(
|
||||||
|
HomeSetting(
|
||||||
|
R.string.install_firmware,
|
||||||
|
R.string.install_firmware_description,
|
||||||
|
R.drawable.ic_firmware
|
||||||
|
) { mainActivity.getFirmware.launch(arrayOf("application/zip")) }
|
||||||
|
)
|
||||||
|
add(
|
||||||
|
HomeSetting(
|
||||||
|
R.string.share_log,
|
||||||
|
R.string.share_log_description,
|
||||||
|
R.drawable.ic_log
|
||||||
|
) { shareLog() }
|
||||||
|
)
|
||||||
|
add(
|
||||||
|
HomeSetting(
|
||||||
|
R.string.about,
|
||||||
|
R.string.about_description,
|
||||||
|
R.drawable.ic_info_outline
|
||||||
|
) {
|
||||||
|
exitTransition = MaterialSharedAxis(MaterialSharedAxis.X, true)
|
||||||
|
parentFragmentManager.primaryNavigationFragment?.findNavController()
|
||||||
|
?.navigate(R.id.action_homeSettingsFragment_to_aboutFragment)
|
||||||
|
}
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
if (!BuildConfig.PREMIUM) {
|
if (!BuildConfig.PREMIUM) {
|
||||||
optionsList.add(
|
optionsList.add(
|
||||||
|
|
|
@ -113,6 +113,8 @@ object GpuDriverHelper {
|
||||||
initializeDriverParameters(context)
|
initializeDriverParameters(context)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
external fun supportsCustomDriverLoading(): Boolean
|
||||||
|
|
||||||
// Parse the custom driver metadata to retrieve the name.
|
// Parse the custom driver metadata to retrieve the name.
|
||||||
val customDriverName: String?
|
val customDriverName: String?
|
||||||
get() {
|
get() {
|
||||||
|
|
|
@ -560,6 +560,26 @@ void JNICALL Java_org_yuzu_yuzu_1emu_NativeLibrary_initializeGpuDriver(
|
||||||
GetJString(env, custom_driver_name), GetJString(env, file_redirect_dir));
|
GetJString(env, custom_driver_name), GetJString(env, file_redirect_dir));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[[maybe_unused]] static bool CheckKgslPresent() {
|
||||||
|
constexpr auto KgslPath{"/dev/kgsl-3d0"};
|
||||||
|
|
||||||
|
return access(KgslPath, F_OK) == 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
[[maybe_unused]] bool SupportsCustomDriver() {
|
||||||
|
return android_get_device_api_level() >= 28 && CheckKgslPresent();
|
||||||
|
}
|
||||||
|
|
||||||
|
jboolean JNICALL Java_org_yuzu_yuzu_1emu_utils_GpuDriverHelper_supportsCustomDriverLoading(
|
||||||
|
[[maybe_unused]] JNIEnv* env, [[maybe_unused]] jobject instance) {
|
||||||
|
#ifdef ARCHITECTURE_arm64
|
||||||
|
// If the KGSL device exists custom drivers can be loaded using adrenotools
|
||||||
|
return SupportsCustomDriver();
|
||||||
|
#else
|
||||||
|
return false;
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
jboolean Java_org_yuzu_yuzu_1emu_NativeLibrary_reloadKeys(JNIEnv* env,
|
jboolean Java_org_yuzu_yuzu_1emu_NativeLibrary_reloadKeys(JNIEnv* env,
|
||||||
[[maybe_unused]] jclass clazz) {
|
[[maybe_unused]] jclass clazz) {
|
||||||
Core::Crypto::KeyManager::Instance().ReloadKeys();
|
Core::Crypto::KeyManager::Instance().ReloadKeys();
|
||||||
|
|
|
@ -150,23 +150,29 @@ std::size_t ConcatenatedVfsFile::Read(u8* data, std::size_t length, std::size_t
|
||||||
while (cur_length > 0 && it != concatenation_map.end()) {
|
while (cur_length > 0 && it != concatenation_map.end()) {
|
||||||
// Check if we can read the file at this position.
|
// Check if we can read the file at this position.
|
||||||
const auto& file = it->file;
|
const auto& file = it->file;
|
||||||
const u64 file_offset = it->offset;
|
const u64 map_offset = it->offset;
|
||||||
const u64 file_size = file->GetSize();
|
const u64 file_size = file->GetSize();
|
||||||
|
|
||||||
if (cur_offset >= file_offset + file_size) {
|
if (cur_offset > map_offset + file_size) {
|
||||||
// Entirely out of bounds read.
|
// Entirely out of bounds read.
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Read the file at this position.
|
// Read the file at this position.
|
||||||
const u64 intended_read_size = std::min<u64>(cur_length, file_size);
|
const u64 file_seek = cur_offset - map_offset;
|
||||||
|
const u64 intended_read_size = std::min<u64>(cur_length, file_size - file_seek);
|
||||||
const u64 actual_read_size =
|
const u64 actual_read_size =
|
||||||
file->Read(data + (cur_offset - offset), intended_read_size, cur_offset - file_offset);
|
file->Read(data + (cur_offset - offset), intended_read_size, file_seek);
|
||||||
|
|
||||||
// Update tracking.
|
// Update tracking.
|
||||||
cur_offset += actual_read_size;
|
cur_offset += actual_read_size;
|
||||||
cur_length -= actual_read_size;
|
cur_length -= actual_read_size;
|
||||||
it++;
|
it++;
|
||||||
|
|
||||||
|
// If we encountered a short read, we're done.
|
||||||
|
if (actual_read_size < intended_read_size) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return cur_offset - offset;
|
return cur_offset - offset;
|
||||||
|
|
|
@ -911,9 +911,13 @@ static Result ToCalendarTimeInternal(const TimeZoneRule& rules, s64 time,
|
||||||
|
|
||||||
calendar_additional_info.is_dst = rules.ttis[tti_index].is_dst;
|
calendar_additional_info.is_dst = rules.ttis[tti_index].is_dst;
|
||||||
const char* time_zone{&rules.chars[rules.ttis[tti_index].abbreviation_list_index]};
|
const char* time_zone{&rules.chars[rules.ttis[tti_index].abbreviation_list_index]};
|
||||||
for (int index{}; time_zone[index] != '\0'; ++index) {
|
u32 index;
|
||||||
|
for (index = 0; time_zone[index] != '\0' && time_zone[index] != ',' &&
|
||||||
|
index < calendar_additional_info.timezone_name.size() - 1;
|
||||||
|
++index) {
|
||||||
calendar_additional_info.timezone_name[index] = time_zone[index];
|
calendar_additional_info.timezone_name[index] = time_zone[index];
|
||||||
}
|
}
|
||||||
|
calendar_additional_info.timezone_name[index] = '\0';
|
||||||
return ResultSuccess;
|
return ResultSuccess;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue