diff options
| -rw-r--r-- | CMakeModules/CopyYuzuQt5Deps.cmake | 12 | ||||
| -rw-r--r-- | README.md | 3 | ||||
| -rw-r--r-- | dist/license.md | 6 | ||||
| -rw-r--r-- | dist/qt_themes/default/icons/16x16/checked.png | bin | 451 -> 657 bytes | |||
| -rw-r--r-- | dist/qt_themes/default/icons/16x16/failed.png | bin | 428 -> 524 bytes | |||
| -rw-r--r-- | license.txt | 4 | ||||
| -rw-r--r-- | src/audio_core/audio_renderer.h | 2 | ||||
| -rw-r--r-- | src/core/hle/service/am/am.cpp | 42 | ||||
| -rw-r--r-- | src/core/hle/service/am/am.h | 3 | ||||
| -rw-r--r-- | src/core/hle/service/hid/hid.cpp | 9 | ||||
| -rw-r--r-- | src/core/hle/service/hid/hid.h | 1 | ||||
| -rw-r--r-- | src/core/hle/service/time/interface.cpp | 2 | ||||
| -rw-r--r-- | src/core/hle/service/time/time.cpp | 29 | ||||
| -rw-r--r-- | src/core/hle/service/time/time.h | 1 | ||||
| -rw-r--r-- | src/video_core/engines/const_buffer_engine_interface.h | 14 | ||||
| -rw-r--r-- | src/video_core/renderer_vulkan/maxwell_to_vk.cpp | 20 | ||||
| -rw-r--r-- | src/yuzu/main.cpp | 15 |
17 files changed, 136 insertions, 27 deletions
diff --git a/CMakeModules/CopyYuzuQt5Deps.cmake b/CMakeModules/CopyYuzuQt5Deps.cmake index 1e9810bba..2598b9b60 100644 --- a/CMakeModules/CopyYuzuQt5Deps.cmake +++ b/CMakeModules/CopyYuzuQt5Deps.cmake | |||
| @@ -6,9 +6,9 @@ function(copy_yuzu_Qt5_deps target_dir) | |||
| 6 | set(Qt5_STYLES_DIR "${Qt5_DIR}/../../../plugins/styles/") | 6 | set(Qt5_STYLES_DIR "${Qt5_DIR}/../../../plugins/styles/") |
| 7 | set(Qt5_IMAGEFORMATS_DIR "${Qt5_DIR}/../../../plugins/imageformats/") | 7 | set(Qt5_IMAGEFORMATS_DIR "${Qt5_DIR}/../../../plugins/imageformats/") |
| 8 | set(Qt5_RESOURCES_DIR "${Qt5_DIR}/../../../resources/") | 8 | set(Qt5_RESOURCES_DIR "${Qt5_DIR}/../../../resources/") |
| 9 | set(PLATFORMS ${DLL_DEST}platforms/) | 9 | set(PLATFORMS ${DLL_DEST}plugins/platforms/) |
| 10 | set(STYLES ${DLL_DEST}styles/) | 10 | set(STYLES ${DLL_DEST}plugins/styles/) |
| 11 | set(IMAGEFORMATS ${DLL_DEST}imageformats/) | 11 | set(IMAGEFORMATS ${DLL_DEST}plugins/imageformats/) |
| 12 | windows_copy_files(${target_dir} ${Qt5_DLL_DIR} ${DLL_DEST} | 12 | windows_copy_files(${target_dir} ${Qt5_DLL_DIR} ${DLL_DEST} |
| 13 | icudt*.dll | 13 | icudt*.dll |
| 14 | icuin*.dll | 14 | icuin*.dll |
| @@ -42,11 +42,15 @@ function(copy_yuzu_Qt5_deps target_dir) | |||
| 42 | icudtl.dat | 42 | icudtl.dat |
| 43 | ) | 43 | ) |
| 44 | endif () | 44 | endif () |
| 45 | |||
| 46 | windows_copy_files(yuzu ${Qt5_PLATFORMS_DIR} ${PLATFORMS} qwindows$<$<CONFIG:Debug>:d>.*) | 45 | windows_copy_files(yuzu ${Qt5_PLATFORMS_DIR} ${PLATFORMS} qwindows$<$<CONFIG:Debug>:d>.*) |
| 47 | windows_copy_files(yuzu ${Qt5_STYLES_DIR} ${STYLES} qwindowsvistastyle$<$<CONFIG:Debug>:d>.*) | 46 | windows_copy_files(yuzu ${Qt5_STYLES_DIR} ${STYLES} qwindowsvistastyle$<$<CONFIG:Debug>:d>.*) |
| 48 | windows_copy_files(yuzu ${Qt5_IMAGEFORMATS_DIR} ${IMAGEFORMATS} | 47 | windows_copy_files(yuzu ${Qt5_IMAGEFORMATS_DIR} ${IMAGEFORMATS} |
| 49 | qjpeg$<$<CONFIG:Debug>:d>.* | 48 | qjpeg$<$<CONFIG:Debug>:d>.* |
| 50 | qgif$<$<CONFIG:Debug>:d>.* | 49 | qgif$<$<CONFIG:Debug>:d>.* |
| 51 | ) | 50 | ) |
| 51 | # Create an empty qt.conf file. Qt will detect that this file exists, and use the folder that its in as the root folder. | ||
| 52 | # This way it'll look for plugins in the root/plugins/ folder | ||
| 53 | add_custom_command(TARGET yuzu POST_BUILD | ||
| 54 | COMMAND ${CMAKE_COMMAND} -E touch ${DLL_DEST}qt.conf | ||
| 55 | ) | ||
| 52 | endfunction(copy_yuzu_Qt5_deps) | 56 | endfunction(copy_yuzu_Qt5_deps) |
| @@ -2,6 +2,7 @@ yuzu emulator | |||
| 2 | ============= | 2 | ============= |
| 3 | [](https://travis-ci.com/yuzu-emu/yuzu) | 3 | [](https://travis-ci.com/yuzu-emu/yuzu) |
| 4 | [](https://dev.azure.com/yuzu-emu/yuzu/) | 4 | [](https://dev.azure.com/yuzu-emu/yuzu/) |
| 5 | [](https://discord.gg/XQV6dn9) | ||
| 5 | 6 | ||
| 6 | yuzu is an experimental open-source emulator for the Nintendo Switch from the creators of [Citra](https://citra-emu.org/). | 7 | yuzu is an experimental open-source emulator for the Nintendo Switch from the creators of [Citra](https://citra-emu.org/). |
| 7 | 8 | ||
| @@ -21,7 +22,7 @@ For development discussion, please join us on [Discord](https://discord.gg/XQV6d | |||
| 21 | 22 | ||
| 22 | Most of the development happens on GitHub. It's also where [our central repository](https://github.com/yuzu-emu/yuzu) is hosted. | 23 | Most of the development happens on GitHub. It's also where [our central repository](https://github.com/yuzu-emu/yuzu) is hosted. |
| 23 | 24 | ||
| 24 | If you want to contribute please take a look at the [Contributor's Guide](CONTRIBUTING.md) and [Developer Information](https://github.com/yuzu-emu/yuzu/wiki/Developer-Information). You should also contact any of the developers on Discord in order to know about the current state of the emulator. | 25 | If you want to contribute please take a look at the [Contributor's Guide](https://github.com/yuzu-emu/yuzu/wiki/Contributing) and [Developer Information](https://github.com/yuzu-emu/yuzu/wiki/Developer-Information). You should also contact any of the developers on Discord in order to know about the current state of the emulator. |
| 25 | 26 | ||
| 26 | ### Building | 27 | ### Building |
| 27 | 28 | ||
diff --git a/dist/license.md b/dist/license.md index b777ebb20..f1ff35c95 100644 --- a/dist/license.md +++ b/dist/license.md | |||
| @@ -2,8 +2,8 @@ The icons in this folder and its subfolders have the following licenses: | |||
| 2 | 2 | ||
| 3 | Icon Name | License | Origin/Author | 3 | Icon Name | License | Origin/Author |
| 4 | --- | --- | --- | 4 | --- | --- | --- |
| 5 | qt_themes/default/icons/16x16/checked.png | Free for non-commercial use | 5 | qt_themes/default/icons/16x16/checked.png | CC BY-ND 3.0 | https://icons8.com |
| 6 | qt_themes/default/icons/16x16/failed.png | Free for non-commercial use | 6 | qt_themes/default/icons/16x16/failed.png | CC BY-ND 3.0 | https://icons8.com |
| 7 | qt_themes/default/icons/16x16/lock.png | CC BY-ND 3.0 | https://icons8.com | 7 | qt_themes/default/icons/16x16/lock.png | CC BY-ND 3.0 | https://icons8.com |
| 8 | qt_themes/default/icons/256x256/plus_folder.png | CC BY-ND 3.0 | https://icons8.com | 8 | qt_themes/default/icons/256x256/plus_folder.png | CC BY-ND 3.0 | https://icons8.com |
| 9 | qt_themes/default/icons/48x48/bad_folder.png | CC BY-ND 3.0 | https://icons8.com | 9 | qt_themes/default/icons/48x48/bad_folder.png | CC BY-ND 3.0 | https://icons8.com |
| @@ -11,8 +11,6 @@ qt_themes/default/icons/48x48/chip.png | CC BY-ND 3.0 | https://icons8.com | |||
| 11 | qt_themes/default/icons/48x48/folder.png | CC BY-ND 3.0 | https://icons8.com | 11 | qt_themes/default/icons/48x48/folder.png | CC BY-ND 3.0 | https://icons8.com |
| 12 | qt_themes/default/icons/48x48/plus.png | CC0 1.0 | Designed by BreadFish64 from the Citra team | 12 | qt_themes/default/icons/48x48/plus.png | CC0 1.0 | Designed by BreadFish64 from the Citra team |
| 13 | qt_themes/default/icons/48x48/sd_card.png | CC BY-ND 3.0 | https://icons8.com | 13 | qt_themes/default/icons/48x48/sd_card.png | CC BY-ND 3.0 | https://icons8.com |
| 14 | qt_themes/qdarkstyle/icons/16x16/checked.png | Free for non-commercial use | ||
| 15 | qt_themes/qdarkstyle/icons/16x16/failed.png | Free for non-commercial use | ||
| 16 | qt_themes/qdarkstyle/icons/16x16/lock.png | CC BY-ND 3.0 | https://icons8.com | 14 | qt_themes/qdarkstyle/icons/16x16/lock.png | CC BY-ND 3.0 | https://icons8.com |
| 17 | qt_themes/qdarkstyle/icons/256x256/plus_folder.png | CC BY-ND 3.0 | https://icons8.com | 15 | qt_themes/qdarkstyle/icons/256x256/plus_folder.png | CC BY-ND 3.0 | https://icons8.com |
| 18 | qt_themes/qdarkstyle/icons/48x48/bad_folder.png | CC BY-ND 3.0 | https://icons8.com | 16 | qt_themes/qdarkstyle/icons/48x48/bad_folder.png | CC BY-ND 3.0 | https://icons8.com |
diff --git a/dist/qt_themes/default/icons/16x16/checked.png b/dist/qt_themes/default/icons/16x16/checked.png index c277e6b40..3e017b715 100644 --- a/dist/qt_themes/default/icons/16x16/checked.png +++ b/dist/qt_themes/default/icons/16x16/checked.png | |||
| Binary files differ | |||
diff --git a/dist/qt_themes/default/icons/16x16/failed.png b/dist/qt_themes/default/icons/16x16/failed.png index ac10f174a..7c4047dd0 100644 --- a/dist/qt_themes/default/icons/16x16/failed.png +++ b/dist/qt_themes/default/icons/16x16/failed.png | |||
| Binary files differ | |||
diff --git a/license.txt b/license.txt index bf5aec0e6..86e7b3c1b 100644 --- a/license.txt +++ b/license.txt | |||
| @@ -343,8 +343,8 @@ The icons used in this project have the following licenses: | |||
| 343 | 343 | ||
| 344 | Icon Name | License | Origin/Author | 344 | Icon Name | License | Origin/Author |
| 345 | --- | --- | --- | 345 | --- | --- | --- |
| 346 | checked.png | Free for non-commercial use | 346 | checked.png | CC BY-ND 3.0 | https://icons8.com |
| 347 | failed.png | Free for non-commercial use | 347 | failed.png | CC BY-ND 3.0 | https://icons8.com |
| 348 | lock.png | CC BY-ND 3.0 | https://icons8.com | 348 | lock.png | CC BY-ND 3.0 | https://icons8.com |
| 349 | plus_folder.png (Default, Dark) | CC BY-ND 3.0 | https://icons8.com | 349 | plus_folder.png (Default, Dark) | CC BY-ND 3.0 | https://icons8.com |
| 350 | bad_folder.png (Default, Dark) | CC BY-ND 3.0 | https://icons8.com | 350 | bad_folder.png (Default, Dark) | CC BY-ND 3.0 | https://icons8.com |
diff --git a/src/audio_core/audio_renderer.h b/src/audio_core/audio_renderer.h index be1b019f1..c0fae669e 100644 --- a/src/audio_core/audio_renderer.h +++ b/src/audio_core/audio_renderer.h | |||
| @@ -189,7 +189,7 @@ struct UpdateDataHeader { | |||
| 189 | UpdateDataHeader() {} | 189 | UpdateDataHeader() {} |
| 190 | 190 | ||
| 191 | explicit UpdateDataHeader(const AudioRendererParameter& config) { | 191 | explicit UpdateDataHeader(const AudioRendererParameter& config) { |
| 192 | revision = Common::MakeMagic('R', 'E', 'V', '4'); // 5.1.0 Revision | 192 | revision = Common::MakeMagic('R', 'E', 'V', '8'); // 9.2.0 Revision |
| 193 | behavior_size = 0xb0; | 193 | behavior_size = 0xb0; |
| 194 | memory_pools_size = (config.effect_count + (config.voice_count * 4)) * 0x10; | 194 | memory_pools_size = (config.effect_count + (config.voice_count * 4)) * 0x10; |
| 195 | voices_size = config.voice_count * 0x10; | 195 | voices_size = config.voice_count * 0x10; |
diff --git a/src/core/hle/service/am/am.cpp b/src/core/hle/service/am/am.cpp index d1bf13c89..557608e76 100644 --- a/src/core/hle/service/am/am.cpp +++ b/src/core/hle/service/am/am.cpp | |||
| @@ -52,6 +52,11 @@ enum class LaunchParameterKind : u32 { | |||
| 52 | AccountPreselectedUser = 2, | 52 | AccountPreselectedUser = 2, |
| 53 | }; | 53 | }; |
| 54 | 54 | ||
| 55 | enum class VrMode : u8 { | ||
| 56 | Disabled = 0, | ||
| 57 | Enabled = 1, | ||
| 58 | }; | ||
| 59 | |||
| 55 | constexpr u32 LAUNCH_PARAMETER_ACCOUNT_PRESELECTED_USER_MAGIC = 0xC79497CA; | 60 | constexpr u32 LAUNCH_PARAMETER_ACCOUNT_PRESELECTED_USER_MAGIC = 0xC79497CA; |
| 56 | 61 | ||
| 57 | struct LaunchParameterAccountPreselectedUser { | 62 | struct LaunchParameterAccountPreselectedUser { |
| @@ -605,11 +610,11 @@ ICommonStateGetter::ICommonStateGetter(Core::System& system, | |||
| 605 | {30, nullptr, "GetHomeButtonReaderLockAccessor"}, | 610 | {30, nullptr, "GetHomeButtonReaderLockAccessor"}, |
| 606 | {31, nullptr, "GetReaderLockAccessorEx"}, | 611 | {31, nullptr, "GetReaderLockAccessorEx"}, |
| 607 | {40, nullptr, "GetCradleFwVersion"}, | 612 | {40, nullptr, "GetCradleFwVersion"}, |
| 608 | {50, nullptr, "IsVrModeEnabled"}, | 613 | {50, &ICommonStateGetter::IsVrModeEnabled, "IsVrModeEnabled"}, |
| 609 | {51, nullptr, "SetVrModeEnabled"}, | 614 | {51, &ICommonStateGetter::SetVrModeEnabled, "SetVrModeEnabled"}, |
| 610 | {52, &ICommonStateGetter::SetLcdBacklighOffEnabled, "SetLcdBacklighOffEnabled"}, | 615 | {52, &ICommonStateGetter::SetLcdBacklighOffEnabled, "SetLcdBacklighOffEnabled"}, |
| 611 | {53, nullptr, "BeginVrModeEx"}, | 616 | {53, nullptr, "BeginVrModeEx"}, |
| 612 | {54, nullptr, "EndVrModeEx"}, | 617 | {54, &ICommonStateGetter::EndVrModeEx, "EndVrModeEx"}, |
| 613 | {55, nullptr, "IsInControllerFirmwareUpdateSection"}, | 618 | {55, nullptr, "IsInControllerFirmwareUpdateSection"}, |
| 614 | {60, &ICommonStateGetter::GetDefaultDisplayResolution, "GetDefaultDisplayResolution"}, | 619 | {60, &ICommonStateGetter::GetDefaultDisplayResolution, "GetDefaultDisplayResolution"}, |
| 615 | {61, &ICommonStateGetter::GetDefaultDisplayResolutionChangeEvent, "GetDefaultDisplayResolutionChangeEvent"}, | 620 | {61, &ICommonStateGetter::GetDefaultDisplayResolutionChangeEvent, "GetDefaultDisplayResolutionChangeEvent"}, |
| @@ -672,6 +677,30 @@ void ICommonStateGetter::GetCurrentFocusState(Kernel::HLERequestContext& ctx) { | |||
| 672 | rb.Push(static_cast<u8>(FocusState::InFocus)); | 677 | rb.Push(static_cast<u8>(FocusState::InFocus)); |
| 673 | } | 678 | } |
| 674 | 679 | ||
| 680 | void ICommonStateGetter::IsVrModeEnabled(Kernel::HLERequestContext& ctx) { | ||
| 681 | LOG_WARNING(Service_AM, "(STUBBED) called"); | ||
| 682 | |||
| 683 | IPC::ResponseBuilder rb{ctx, 3}; | ||
| 684 | rb.Push(RESULT_SUCCESS); | ||
| 685 | rb.PushEnum(VrMode::Disabled); | ||
| 686 | } | ||
| 687 | |||
| 688 | void ICommonStateGetter::SetVrModeEnabled(Kernel::HLERequestContext& ctx) { | ||
| 689 | IPC::RequestParser rp{ctx}; | ||
| 690 | const auto is_vr_mode_enabled = rp.Pop<bool>(); | ||
| 691 | |||
| 692 | LOG_WARNING(Service_AM, "(STUBBED) called. is_vr_mode_enabled={}", is_vr_mode_enabled); | ||
| 693 | |||
| 694 | IPC::ResponseBuilder rb{ctx, 2}; | ||
| 695 | if (!is_vr_mode_enabled) { | ||
| 696 | rb.Push(RESULT_SUCCESS); | ||
| 697 | } else { | ||
| 698 | // TODO: Find better error code for this | ||
| 699 | UNIMPLEMENTED_MSG("is_vr_mode_enabled={}", is_vr_mode_enabled); | ||
| 700 | rb.Push(RESULT_UNKNOWN); | ||
| 701 | } | ||
| 702 | } | ||
| 703 | |||
| 675 | void ICommonStateGetter::SetLcdBacklighOffEnabled(Kernel::HLERequestContext& ctx) { | 704 | void ICommonStateGetter::SetLcdBacklighOffEnabled(Kernel::HLERequestContext& ctx) { |
| 676 | IPC::RequestParser rp{ctx}; | 705 | IPC::RequestParser rp{ctx}; |
| 677 | const auto is_lcd_backlight_off_enabled = rp.Pop<bool>(); | 706 | const auto is_lcd_backlight_off_enabled = rp.Pop<bool>(); |
| @@ -683,6 +712,13 @@ void ICommonStateGetter::SetLcdBacklighOffEnabled(Kernel::HLERequestContext& ctx | |||
| 683 | rb.Push(RESULT_SUCCESS); | 712 | rb.Push(RESULT_SUCCESS); |
| 684 | } | 713 | } |
| 685 | 714 | ||
| 715 | void ICommonStateGetter::EndVrModeEx(Kernel::HLERequestContext& ctx) { | ||
| 716 | LOG_WARNING(Service_AM, "(STUBBED) called"); | ||
| 717 | |||
| 718 | IPC::ResponseBuilder rb{ctx, 2}; | ||
| 719 | rb.Push(RESULT_SUCCESS); | ||
| 720 | } | ||
| 721 | |||
| 686 | void ICommonStateGetter::GetDefaultDisplayResolutionChangeEvent(Kernel::HLERequestContext& ctx) { | 722 | void ICommonStateGetter::GetDefaultDisplayResolutionChangeEvent(Kernel::HLERequestContext& ctx) { |
| 687 | LOG_DEBUG(Service_AM, "called"); | 723 | LOG_DEBUG(Service_AM, "called"); |
| 688 | 724 | ||
diff --git a/src/core/hle/service/am/am.h b/src/core/hle/service/am/am.h index 0843de781..53cfce10f 100644 --- a/src/core/hle/service/am/am.h +++ b/src/core/hle/service/am/am.h | |||
| @@ -182,7 +182,10 @@ private: | |||
| 182 | void GetOperationMode(Kernel::HLERequestContext& ctx); | 182 | void GetOperationMode(Kernel::HLERequestContext& ctx); |
| 183 | void GetPerformanceMode(Kernel::HLERequestContext& ctx); | 183 | void GetPerformanceMode(Kernel::HLERequestContext& ctx); |
| 184 | void GetBootMode(Kernel::HLERequestContext& ctx); | 184 | void GetBootMode(Kernel::HLERequestContext& ctx); |
| 185 | void IsVrModeEnabled(Kernel::HLERequestContext& ctx); | ||
| 186 | void SetVrModeEnabled(Kernel::HLERequestContext& ctx); | ||
| 185 | void SetLcdBacklighOffEnabled(Kernel::HLERequestContext& ctx); | 187 | void SetLcdBacklighOffEnabled(Kernel::HLERequestContext& ctx); |
| 188 | void EndVrModeEx(Kernel::HLERequestContext& ctx); | ||
| 186 | void GetDefaultDisplayResolution(Kernel::HLERequestContext& ctx); | 189 | void GetDefaultDisplayResolution(Kernel::HLERequestContext& ctx); |
| 187 | void SetCpuBoostMode(Kernel::HLERequestContext& ctx); | 190 | void SetCpuBoostMode(Kernel::HLERequestContext& ctx); |
| 188 | 191 | ||
diff --git a/src/core/hle/service/hid/hid.cpp b/src/core/hle/service/hid/hid.cpp index e6b56a9f9..d6ed5f304 100644 --- a/src/core/hle/service/hid/hid.cpp +++ b/src/core/hle/service/hid/hid.cpp | |||
| @@ -235,7 +235,7 @@ Hid::Hid(Core::System& system) : ServiceFramework("hid"), system(system) { | |||
| 235 | {303, nullptr, "ActivateSevenSixAxisSensor"}, | 235 | {303, nullptr, "ActivateSevenSixAxisSensor"}, |
| 236 | {304, nullptr, "StartSevenSixAxisSensor"}, | 236 | {304, nullptr, "StartSevenSixAxisSensor"}, |
| 237 | {305, nullptr, "StopSevenSixAxisSensor"}, | 237 | {305, nullptr, "StopSevenSixAxisSensor"}, |
| 238 | {306, nullptr, "InitializeSevenSixAxisSensor"}, | 238 | {306, &Hid::InitializeSevenSixAxisSensor, "InitializeSevenSixAxisSensor"}, |
| 239 | {307, nullptr, "FinalizeSevenSixAxisSensor"}, | 239 | {307, nullptr, "FinalizeSevenSixAxisSensor"}, |
| 240 | {308, nullptr, "SetSevenSixAxisSensorFusionStrength"}, | 240 | {308, nullptr, "SetSevenSixAxisSensorFusionStrength"}, |
| 241 | {309, nullptr, "GetSevenSixAxisSensorFusionStrength"}, | 241 | {309, nullptr, "GetSevenSixAxisSensorFusionStrength"}, |
| @@ -853,6 +853,13 @@ void Hid::SetPalmaBoostMode(Kernel::HLERequestContext& ctx) { | |||
| 853 | rb.Push(RESULT_SUCCESS); | 853 | rb.Push(RESULT_SUCCESS); |
| 854 | } | 854 | } |
| 855 | 855 | ||
| 856 | void Hid::InitializeSevenSixAxisSensor(Kernel::HLERequestContext& ctx) { | ||
| 857 | LOG_WARNING(Service_HID, "(STUBBED) called"); | ||
| 858 | |||
| 859 | IPC::ResponseBuilder rb{ctx, 2}; | ||
| 860 | rb.Push(RESULT_SUCCESS); | ||
| 861 | } | ||
| 862 | |||
| 856 | class HidDbg final : public ServiceFramework<HidDbg> { | 863 | class HidDbg final : public ServiceFramework<HidDbg> { |
| 857 | public: | 864 | public: |
| 858 | explicit HidDbg() : ServiceFramework{"hid:dbg"} { | 865 | explicit HidDbg() : ServiceFramework{"hid:dbg"} { |
diff --git a/src/core/hle/service/hid/hid.h b/src/core/hle/service/hid/hid.h index ad20f147c..039c38b58 100644 --- a/src/core/hle/service/hid/hid.h +++ b/src/core/hle/service/hid/hid.h | |||
| @@ -128,6 +128,7 @@ private: | |||
| 128 | void StopSixAxisSensor(Kernel::HLERequestContext& ctx); | 128 | void StopSixAxisSensor(Kernel::HLERequestContext& ctx); |
| 129 | void SetIsPalmaAllConnectable(Kernel::HLERequestContext& ctx); | 129 | void SetIsPalmaAllConnectable(Kernel::HLERequestContext& ctx); |
| 130 | void SetPalmaBoostMode(Kernel::HLERequestContext& ctx); | 130 | void SetPalmaBoostMode(Kernel::HLERequestContext& ctx); |
| 131 | void InitializeSevenSixAxisSensor(Kernel::HLERequestContext& ctx); | ||
| 131 | 132 | ||
| 132 | std::shared_ptr<IAppletResource> applet_resource; | 133 | std::shared_ptr<IAppletResource> applet_resource; |
| 133 | Core::System& system; | 134 | Core::System& system; |
diff --git a/src/core/hle/service/time/interface.cpp b/src/core/hle/service/time/interface.cpp index 1660bbdb8..f509653a3 100644 --- a/src/core/hle/service/time/interface.cpp +++ b/src/core/hle/service/time/interface.cpp | |||
| @@ -30,7 +30,7 @@ Time::Time(std::shared_ptr<Module> module, Core::System& system, const char* nam | |||
| 30 | {400, &Time::GetClockSnapshot, "GetClockSnapshot"}, | 30 | {400, &Time::GetClockSnapshot, "GetClockSnapshot"}, |
| 31 | {401, &Time::GetClockSnapshotFromSystemClockContext, "GetClockSnapshotFromSystemClockContext"}, | 31 | {401, &Time::GetClockSnapshotFromSystemClockContext, "GetClockSnapshotFromSystemClockContext"}, |
| 32 | {500, nullptr, "CalculateStandardUserSystemClockDifferenceByUser"}, | 32 | {500, nullptr, "CalculateStandardUserSystemClockDifferenceByUser"}, |
| 33 | {501, nullptr, "CalculateSpanBetween"}, | 33 | {501, &Time::CalculateSpanBetween, "CalculateSpanBetween"}, |
| 34 | }; | 34 | }; |
| 35 | // clang-format on | 35 | // clang-format on |
| 36 | 36 | ||
diff --git a/src/core/hle/service/time/time.cpp b/src/core/hle/service/time/time.cpp index 749b7be70..ce859f18d 100644 --- a/src/core/hle/service/time/time.cpp +++ b/src/core/hle/service/time/time.cpp | |||
| @@ -308,6 +308,35 @@ void Module::Interface::GetClockSnapshotFromSystemClockContext(Kernel::HLEReques | |||
| 308 | ctx.WriteBuffer(&clock_snapshot, sizeof(Clock::ClockSnapshot)); | 308 | ctx.WriteBuffer(&clock_snapshot, sizeof(Clock::ClockSnapshot)); |
| 309 | } | 309 | } |
| 310 | 310 | ||
| 311 | void Module::Interface::CalculateSpanBetween(Kernel::HLERequestContext& ctx) { | ||
| 312 | LOG_DEBUG(Service_Time, "called"); | ||
| 313 | |||
| 314 | IPC::RequestParser rp{ctx}; | ||
| 315 | const auto snapshot_a = rp.PopRaw<Clock::ClockSnapshot>(); | ||
| 316 | const auto snapshot_b = rp.PopRaw<Clock::ClockSnapshot>(); | ||
| 317 | |||
| 318 | Clock::TimeSpanType time_span_type{}; | ||
| 319 | s64 span{}; | ||
| 320 | if (const ResultCode result{snapshot_a.steady_clock_time_point.GetSpanBetween( | ||
| 321 | snapshot_b.steady_clock_time_point, span)}; | ||
| 322 | result != RESULT_SUCCESS) { | ||
| 323 | if (snapshot_a.network_time && snapshot_b.network_time) { | ||
| 324 | time_span_type = | ||
| 325 | Clock::TimeSpanType::FromSeconds(snapshot_b.network_time - snapshot_a.network_time); | ||
| 326 | } else { | ||
| 327 | IPC::ResponseBuilder rb{ctx, 2}; | ||
| 328 | rb.Push(ERROR_TIME_NOT_FOUND); | ||
| 329 | return; | ||
| 330 | } | ||
| 331 | } else { | ||
| 332 | time_span_type = Clock::TimeSpanType::FromSeconds(span); | ||
| 333 | } | ||
| 334 | |||
| 335 | IPC::ResponseBuilder rb{ctx, (sizeof(s64) / 4) + 2}; | ||
| 336 | rb.Push(RESULT_SUCCESS); | ||
| 337 | rb.PushRaw(time_span_type.nanoseconds); | ||
| 338 | } | ||
| 339 | |||
| 311 | void Module::Interface::GetSharedMemoryNativeHandle(Kernel::HLERequestContext& ctx) { | 340 | void Module::Interface::GetSharedMemoryNativeHandle(Kernel::HLERequestContext& ctx) { |
| 312 | LOG_DEBUG(Service_Time, "called"); | 341 | LOG_DEBUG(Service_Time, "called"); |
| 313 | IPC::ResponseBuilder rb{ctx, 2, 1}; | 342 | IPC::ResponseBuilder rb{ctx, 2, 1}; |
diff --git a/src/core/hle/service/time/time.h b/src/core/hle/service/time/time.h index aadc2df60..351988468 100644 --- a/src/core/hle/service/time/time.h +++ b/src/core/hle/service/time/time.h | |||
| @@ -32,6 +32,7 @@ public: | |||
| 32 | void CalculateMonotonicSystemClockBaseTimePoint(Kernel::HLERequestContext& ctx); | 32 | void CalculateMonotonicSystemClockBaseTimePoint(Kernel::HLERequestContext& ctx); |
| 33 | void GetClockSnapshot(Kernel::HLERequestContext& ctx); | 33 | void GetClockSnapshot(Kernel::HLERequestContext& ctx); |
| 34 | void GetClockSnapshotFromSystemClockContext(Kernel::HLERequestContext& ctx); | 34 | void GetClockSnapshotFromSystemClockContext(Kernel::HLERequestContext& ctx); |
| 35 | void CalculateSpanBetween(Kernel::HLERequestContext& ctx); | ||
| 35 | void GetSharedMemoryNativeHandle(Kernel::HLERequestContext& ctx); | 36 | void GetSharedMemoryNativeHandle(Kernel::HLERequestContext& ctx); |
| 36 | 37 | ||
| 37 | private: | 38 | private: |
diff --git a/src/video_core/engines/const_buffer_engine_interface.h b/src/video_core/engines/const_buffer_engine_interface.h index 724ee0fd6..ebe139504 100644 --- a/src/video_core/engines/const_buffer_engine_interface.h +++ b/src/video_core/engines/const_buffer_engine_interface.h | |||
| @@ -18,10 +18,14 @@ struct SamplerDescriptor { | |||
| 18 | union { | 18 | union { |
| 19 | u32 raw = 0; | 19 | u32 raw = 0; |
| 20 | BitField<0, 2, Tegra::Shader::TextureType> texture_type; | 20 | BitField<0, 2, Tegra::Shader::TextureType> texture_type; |
| 21 | BitField<2, 3, Tegra::Texture::ComponentType> component_type; | 21 | BitField<2, 3, Tegra::Texture::ComponentType> r_type; |
| 22 | BitField<5, 1, u32> is_array; | 22 | BitField<5, 1, u32> is_array; |
| 23 | BitField<6, 1, u32> is_buffer; | 23 | BitField<6, 1, u32> is_buffer; |
| 24 | BitField<7, 1, u32> is_shadow; | 24 | BitField<7, 1, u32> is_shadow; |
| 25 | BitField<8, 3, Tegra::Texture::ComponentType> g_type; | ||
| 26 | BitField<11, 3, Tegra::Texture::ComponentType> b_type; | ||
| 27 | BitField<14, 3, Tegra::Texture::ComponentType> a_type; | ||
| 28 | BitField<17, 7, Tegra::Texture::TextureFormat> format; | ||
| 25 | }; | 29 | }; |
| 26 | 30 | ||
| 27 | bool operator==(const SamplerDescriptor& rhs) const noexcept { | 31 | bool operator==(const SamplerDescriptor& rhs) const noexcept { |
| @@ -36,9 +40,11 @@ struct SamplerDescriptor { | |||
| 36 | using Tegra::Shader::TextureType; | 40 | using Tegra::Shader::TextureType; |
| 37 | SamplerDescriptor result; | 41 | SamplerDescriptor result; |
| 38 | 42 | ||
| 39 | // This is going to be used to determine the shading language type. | 43 | result.format.Assign(tic.format.Value()); |
| 40 | // Because of that we don't care about all component types on color textures. | 44 | result.r_type.Assign(tic.r_type.Value()); |
| 41 | result.component_type.Assign(tic.r_type.Value()); | 45 | result.g_type.Assign(tic.g_type.Value()); |
| 46 | result.b_type.Assign(tic.b_type.Value()); | ||
| 47 | result.a_type.Assign(tic.a_type.Value()); | ||
| 42 | 48 | ||
| 43 | switch (tic.texture_type.Value()) { | 49 | switch (tic.texture_type.Value()) { |
| 44 | case Tegra::Texture::TextureType::Texture1D: | 50 | case Tegra::Texture::TextureType::Texture1D: |
diff --git a/src/video_core/renderer_vulkan/maxwell_to_vk.cpp b/src/video_core/renderer_vulkan/maxwell_to_vk.cpp index f93447610..7480cb7c3 100644 --- a/src/video_core/renderer_vulkan/maxwell_to_vk.cpp +++ b/src/video_core/renderer_vulkan/maxwell_to_vk.cpp | |||
| @@ -401,6 +401,26 @@ vk::Format VertexFormat(Maxwell::VertexAttribute::Type type, Maxwell::VertexAttr | |||
| 401 | } | 401 | } |
| 402 | break; | 402 | break; |
| 403 | case Maxwell::VertexAttribute::Type::SignedScaled: | 403 | case Maxwell::VertexAttribute::Type::SignedScaled: |
| 404 | switch (size) { | ||
| 405 | case Maxwell::VertexAttribute::Size::Size_8: | ||
| 406 | return vk::Format::eR8Sscaled; | ||
| 407 | case Maxwell::VertexAttribute::Size::Size_8_8: | ||
| 408 | return vk::Format::eR8G8Sscaled; | ||
| 409 | case Maxwell::VertexAttribute::Size::Size_8_8_8: | ||
| 410 | return vk::Format::eR8G8B8Sscaled; | ||
| 411 | case Maxwell::VertexAttribute::Size::Size_8_8_8_8: | ||
| 412 | return vk::Format::eR8G8B8A8Sscaled; | ||
| 413 | case Maxwell::VertexAttribute::Size::Size_16: | ||
| 414 | return vk::Format::eR16Sscaled; | ||
| 415 | case Maxwell::VertexAttribute::Size::Size_16_16: | ||
| 416 | return vk::Format::eR16G16Sscaled; | ||
| 417 | case Maxwell::VertexAttribute::Size::Size_16_16_16: | ||
| 418 | return vk::Format::eR16G16B16Sscaled; | ||
| 419 | case Maxwell::VertexAttribute::Size::Size_16_16_16_16: | ||
| 420 | return vk::Format::eR16G16B16A16Sscaled; | ||
| 421 | default: | ||
| 422 | break; | ||
| 423 | } | ||
| 404 | break; | 424 | break; |
| 405 | case Maxwell::VertexAttribute::Type::Float: | 425 | case Maxwell::VertexAttribute::Type::Float: |
| 406 | switch (size) { | 426 | switch (size) { |
diff --git a/src/yuzu/main.cpp b/src/yuzu/main.cpp index 47615adfe..d7e59d0cd 100644 --- a/src/yuzu/main.cpp +++ b/src/yuzu/main.cpp | |||
| @@ -1034,6 +1034,14 @@ void GMainWindow::BootGame(const QString& filename) { | |||
| 1034 | } | 1034 | } |
| 1035 | 1035 | ||
| 1036 | void GMainWindow::ShutdownGame() { | 1036 | void GMainWindow::ShutdownGame() { |
| 1037 | if (!emulation_running) { | ||
| 1038 | return; | ||
| 1039 | } | ||
| 1040 | |||
| 1041 | if (ui.action_Fullscreen->isChecked()) { | ||
| 1042 | HideFullscreen(); | ||
| 1043 | } | ||
| 1044 | |||
| 1037 | AllowOSSleep(); | 1045 | AllowOSSleep(); |
| 1038 | 1046 | ||
| 1039 | discord_rpc->Pause(); | 1047 | discord_rpc->Pause(); |
| @@ -1716,11 +1724,6 @@ void GMainWindow::OnStartGame() { | |||
| 1716 | } | 1724 | } |
| 1717 | 1725 | ||
| 1718 | void GMainWindow::OnPauseGame() { | 1726 | void GMainWindow::OnPauseGame() { |
| 1719 | Core::System& system{Core::System::GetInstance()}; | ||
| 1720 | if (system.GetExitLock() && !ConfirmForceLockedExit()) { | ||
| 1721 | return; | ||
| 1722 | } | ||
| 1723 | |||
| 1724 | emu_thread->SetRunning(false); | 1727 | emu_thread->SetRunning(false); |
| 1725 | 1728 | ||
| 1726 | ui.action_Start->setEnabled(true); | 1729 | ui.action_Start->setEnabled(true); |
| @@ -1803,7 +1806,7 @@ void GMainWindow::ToggleWindowMode() { | |||
| 1803 | // Render in the main window... | 1806 | // Render in the main window... |
| 1804 | render_window->BackupGeometry(); | 1807 | render_window->BackupGeometry(); |
| 1805 | ui.horizontalLayout->addWidget(render_window); | 1808 | ui.horizontalLayout->addWidget(render_window); |
| 1806 | render_window->setFocusPolicy(Qt::ClickFocus); | 1809 | render_window->setFocusPolicy(Qt::StrongFocus); |
| 1807 | if (emulation_running) { | 1810 | if (emulation_running) { |
| 1808 | render_window->setVisible(true); | 1811 | render_window->setVisible(true); |
| 1809 | render_window->setFocus(); | 1812 | render_window->setFocus(); |