diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/common/x64/xbyak_abi.h | 2 | ||||
| -rw-r--r-- | src/common/x64/xbyak_util.h | 2 | ||||
| -rw-r--r-- | src/core/hle/service/am/applets/applet_error.cpp | 31 | ||||
| -rw-r--r-- | src/shader_recompiler/backend/spirv/emit_spirv_context_get_set.cpp | 8 | ||||
| -rw-r--r-- | src/video_core/macro/macro_jit_x64.h | 2 | ||||
| -rw-r--r-- | src/yuzu/applets/qt_software_keyboard.cpp | 2 | ||||
| -rw-r--r-- | src/yuzu/configuration/configure_input_player_widget.cpp | 34 |
7 files changed, 49 insertions, 32 deletions
diff --git a/src/common/x64/xbyak_abi.h b/src/common/x64/xbyak_abi.h index c2c9b6134..0ddf9b83e 100644 --- a/src/common/x64/xbyak_abi.h +++ b/src/common/x64/xbyak_abi.h | |||
| @@ -6,7 +6,7 @@ | |||
| 6 | 6 | ||
| 7 | #include <bitset> | 7 | #include <bitset> |
| 8 | #include <initializer_list> | 8 | #include <initializer_list> |
| 9 | #include <xbyak.h> | 9 | #include <xbyak/xbyak.h> |
| 10 | #include "common/assert.h" | 10 | #include "common/assert.h" |
| 11 | 11 | ||
| 12 | namespace Common::X64 { | 12 | namespace Common::X64 { |
diff --git a/src/common/x64/xbyak_util.h b/src/common/x64/xbyak_util.h index df17f8cbe..44d2558f1 100644 --- a/src/common/x64/xbyak_util.h +++ b/src/common/x64/xbyak_util.h | |||
| @@ -5,7 +5,7 @@ | |||
| 5 | #pragma once | 5 | #pragma once |
| 6 | 6 | ||
| 7 | #include <type_traits> | 7 | #include <type_traits> |
| 8 | #include <xbyak.h> | 8 | #include <xbyak/xbyak.h> |
| 9 | #include "common/x64/xbyak_abi.h" | 9 | #include "common/x64/xbyak_abi.h" |
| 10 | 10 | ||
| 11 | namespace Common::X64 { | 11 | namespace Common::X64 { |
diff --git a/src/core/hle/service/am/applets/applet_error.cpp b/src/core/hle/service/am/applets/applet_error.cpp index ef6854d62..36a4aa9cd 100644 --- a/src/core/hle/service/am/applets/applet_error.cpp +++ b/src/core/hle/service/am/applets/applet_error.cpp | |||
| @@ -16,6 +16,30 @@ | |||
| 16 | 16 | ||
| 17 | namespace Service::AM::Applets { | 17 | namespace Service::AM::Applets { |
| 18 | 18 | ||
| 19 | struct ErrorCode { | ||
| 20 | u32 error_category{}; | ||
| 21 | u32 error_number{}; | ||
| 22 | |||
| 23 | static constexpr ErrorCode FromU64(u64 error_code) { | ||
| 24 | return { | ||
| 25 | .error_category{static_cast<u32>(error_code >> 32)}, | ||
| 26 | .error_number{static_cast<u32>(error_code & 0xFFFFFFFF)}, | ||
| 27 | }; | ||
| 28 | } | ||
| 29 | |||
| 30 | static constexpr ErrorCode FromResultCode(ResultCode result) { | ||
| 31 | return { | ||
| 32 | .error_category{2000 + static_cast<u32>(result.module.Value())}, | ||
| 33 | .error_number{result.description.Value()}, | ||
| 34 | }; | ||
| 35 | } | ||
| 36 | |||
| 37 | constexpr ResultCode ToResultCode() const { | ||
| 38 | return ResultCode{static_cast<ErrorModule>(error_category - 2000), error_number}; | ||
| 39 | } | ||
| 40 | }; | ||
| 41 | static_assert(sizeof(ErrorCode) == 0x8, "ErrorCode has incorrect size."); | ||
| 42 | |||
| 19 | #pragma pack(push, 4) | 43 | #pragma pack(push, 4) |
| 20 | struct ShowError { | 44 | struct ShowError { |
| 21 | u8 mode; | 45 | u8 mode; |
| @@ -76,12 +100,7 @@ void CopyArgumentData(const std::vector<u8>& data, T& variable) { | |||
| 76 | } | 100 | } |
| 77 | 101 | ||
| 78 | ResultCode Decode64BitError(u64 error) { | 102 | ResultCode Decode64BitError(u64 error) { |
| 79 | const auto description = (error >> 32) & 0x1FFF; | 103 | return ErrorCode::FromU64(error).ToResultCode(); |
| 80 | auto module = error & 0x3FF; | ||
| 81 | if (module >= 2000) | ||
| 82 | module -= 2000; | ||
| 83 | module &= 0x1FF; | ||
| 84 | return {static_cast<ErrorModule>(module), static_cast<u32>(description)}; | ||
| 85 | } | 104 | } |
| 86 | 105 | ||
| 87 | } // Anonymous namespace | 106 | } // Anonymous namespace |
diff --git a/src/shader_recompiler/backend/spirv/emit_spirv_context_get_set.cpp b/src/shader_recompiler/backend/spirv/emit_spirv_context_get_set.cpp index fb8c02a77..14c77f162 100644 --- a/src/shader_recompiler/backend/spirv/emit_spirv_context_get_set.cpp +++ b/src/shader_recompiler/backend/spirv/emit_spirv_context_get_set.cpp | |||
| @@ -298,14 +298,10 @@ Id EmitGetAttribute(EmitContext& ctx, IR::Attribute attr, Id vertex) { | |||
| 298 | if (IR::IsGeneric(attr)) { | 298 | if (IR::IsGeneric(attr)) { |
| 299 | const u32 index{IR::GenericAttributeIndex(attr)}; | 299 | const u32 index{IR::GenericAttributeIndex(attr)}; |
| 300 | const std::optional<AttrInfo> type{AttrTypes(ctx, index)}; | 300 | const std::optional<AttrInfo> type{AttrTypes(ctx, index)}; |
| 301 | if (!type) { | 301 | if (!type || !ctx.runtime_info.previous_stage_stores.Generic(index, element)) { |
| 302 | // Attribute is disabled | 302 | // Attribute is disabled or varying component is not written |
| 303 | return ctx.Const(element == 3 ? 1.0f : 0.0f); | 303 | return ctx.Const(element == 3 ? 1.0f : 0.0f); |
| 304 | } | 304 | } |
| 305 | if (!ctx.runtime_info.previous_stage_stores.Generic(index, element)) { | ||
| 306 | // Varying component is not written | ||
| 307 | return ctx.Const(type && element == 3 ? 1.0f : 0.0f); | ||
| 308 | } | ||
| 309 | const Id generic_id{ctx.input_generics.at(index)}; | 305 | const Id generic_id{ctx.input_generics.at(index)}; |
| 310 | const Id pointer{AttrPointer(ctx, type->pointer, vertex, generic_id, ctx.Const(element))}; | 306 | const Id pointer{AttrPointer(ctx, type->pointer, vertex, generic_id, ctx.Const(element))}; |
| 311 | const Id value{ctx.OpLoad(type->id, pointer)}; | 307 | const Id value{ctx.OpLoad(type->id, pointer)}; |
diff --git a/src/video_core/macro/macro_jit_x64.h b/src/video_core/macro/macro_jit_x64.h index 7f50ac2f8..d03d480b4 100644 --- a/src/video_core/macro/macro_jit_x64.h +++ b/src/video_core/macro/macro_jit_x64.h | |||
| @@ -6,7 +6,7 @@ | |||
| 6 | 6 | ||
| 7 | #include <array> | 7 | #include <array> |
| 8 | #include <bitset> | 8 | #include <bitset> |
| 9 | #include <xbyak.h> | 9 | #include <xbyak/xbyak.h> |
| 10 | #include "common/bit_field.h" | 10 | #include "common/bit_field.h" |
| 11 | #include "common/common_types.h" | 11 | #include "common/common_types.h" |
| 12 | #include "common/x64/xbyak_abi.h" | 12 | #include "common/x64/xbyak_abi.h" |
diff --git a/src/yuzu/applets/qt_software_keyboard.cpp b/src/yuzu/applets/qt_software_keyboard.cpp index 848801cec..8fc0c5a36 100644 --- a/src/yuzu/applets/qt_software_keyboard.cpp +++ b/src/yuzu/applets/qt_software_keyboard.cpp | |||
| @@ -438,7 +438,7 @@ void QtSoftwareKeyboardDialog::ShowInlineKeyboard( | |||
| 438 | initialize_parameters.key_disable_flags = appear_parameters.key_disable_flags; | 438 | initialize_parameters.key_disable_flags = appear_parameters.key_disable_flags; |
| 439 | initialize_parameters.enable_backspace_button = appear_parameters.enable_backspace_button; | 439 | initialize_parameters.enable_backspace_button = appear_parameters.enable_backspace_button; |
| 440 | initialize_parameters.enable_return_button = appear_parameters.enable_return_button; | 440 | initialize_parameters.enable_return_button = appear_parameters.enable_return_button; |
| 441 | initialize_parameters.disable_cancel_button = initialize_parameters.disable_cancel_button; | 441 | initialize_parameters.disable_cancel_button = appear_parameters.disable_cancel_button; |
| 442 | 442 | ||
| 443 | SetKeyboardType(); | 443 | SetKeyboardType(); |
| 444 | SetControllerImage(); | 444 | SetControllerImage(); |
diff --git a/src/yuzu/configuration/configure_input_player_widget.cpp b/src/yuzu/configuration/configure_input_player_widget.cpp index cd633e45f..9c890ed5d 100644 --- a/src/yuzu/configuration/configure_input_player_widget.cpp +++ b/src/yuzu/configuration/configure_input_player_widget.cpp | |||
| @@ -647,18 +647,18 @@ void PlayerControlPreview::DrawHandheldController(QPainter& p, const QPointF cen | |||
| 647 | // Face buttons | 647 | // Face buttons |
| 648 | p.setPen(colors.outline); | 648 | p.setPen(colors.outline); |
| 649 | button_color = colors.button; | 649 | button_color = colors.button; |
| 650 | DrawCircleButton(p, face_center + QPoint(face_distance, 0), button_values[A], face_radius); | 650 | DrawCircleButton(p, face_center + QPointF(face_distance, 0), button_values[A], face_radius); |
| 651 | DrawCircleButton(p, face_center + QPoint(0, face_distance), button_values[B], face_radius); | 651 | DrawCircleButton(p, face_center + QPointF(0, face_distance), button_values[B], face_radius); |
| 652 | DrawCircleButton(p, face_center + QPoint(0, -face_distance), button_values[X], face_radius); | 652 | DrawCircleButton(p, face_center + QPointF(0, -face_distance), button_values[X], face_radius); |
| 653 | DrawCircleButton(p, face_center + QPoint(-face_distance, 0), button_values[Y], face_radius); | 653 | DrawCircleButton(p, face_center + QPointF(-face_distance, 0), button_values[Y], face_radius); |
| 654 | 654 | ||
| 655 | // Face buttons text | 655 | // Face buttons text |
| 656 | p.setPen(colors.transparent); | 656 | p.setPen(colors.transparent); |
| 657 | p.setBrush(colors.font); | 657 | p.setBrush(colors.font); |
| 658 | DrawSymbol(p, face_center + QPoint(face_distance, 0), Symbol::A, text_size); | 658 | DrawSymbol(p, face_center + QPointF(face_distance, 0), Symbol::A, text_size); |
| 659 | DrawSymbol(p, face_center + QPoint(0, face_distance), Symbol::B, text_size); | 659 | DrawSymbol(p, face_center + QPointF(0, face_distance), Symbol::B, text_size); |
| 660 | DrawSymbol(p, face_center + QPoint(0, -face_distance), Symbol::X, text_size); | 660 | DrawSymbol(p, face_center + QPointF(0, -face_distance), Symbol::X, text_size); |
| 661 | DrawSymbol(p, face_center + QPoint(-face_distance, 1), Symbol::Y, text_size); | 661 | DrawSymbol(p, face_center + QPointF(-face_distance, 1), Symbol::Y, text_size); |
| 662 | 662 | ||
| 663 | // D-pad constants | 663 | // D-pad constants |
| 664 | const QPointF dpad_center = center + QPoint(-171, 8); | 664 | const QPointF dpad_center = center + QPoint(-171, 8); |
| @@ -669,18 +669,20 @@ void PlayerControlPreview::DrawHandheldController(QPainter& p, const QPointF cen | |||
| 669 | // D-pad buttons | 669 | // D-pad buttons |
| 670 | p.setPen(colors.outline); | 670 | p.setPen(colors.outline); |
| 671 | button_color = colors.button; | 671 | button_color = colors.button; |
| 672 | DrawCircleButton(p, dpad_center + QPoint(dpad_distance, 0), button_values[DRight], dpad_radius); | 672 | DrawCircleButton(p, dpad_center + QPointF(dpad_distance, 0), button_values[DRight], |
| 673 | DrawCircleButton(p, dpad_center + QPoint(0, dpad_distance), button_values[DDown], dpad_radius); | 673 | dpad_radius); |
| 674 | DrawCircleButton(p, dpad_center + QPoint(0, -dpad_distance), button_values[DUp], dpad_radius); | 674 | DrawCircleButton(p, dpad_center + QPointF(0, dpad_distance), button_values[DDown], dpad_radius); |
| 675 | DrawCircleButton(p, dpad_center + QPoint(-dpad_distance, 0), button_values[DLeft], dpad_radius); | 675 | DrawCircleButton(p, dpad_center + QPointF(0, -dpad_distance), button_values[DUp], dpad_radius); |
| 676 | DrawCircleButton(p, dpad_center + QPointF(-dpad_distance, 0), button_values[DLeft], | ||
| 677 | dpad_radius); | ||
| 676 | 678 | ||
| 677 | // D-pad arrows | 679 | // D-pad arrows |
| 678 | p.setPen(colors.font2); | 680 | p.setPen(colors.font2); |
| 679 | p.setBrush(colors.font2); | 681 | p.setBrush(colors.font2); |
| 680 | DrawArrow(p, dpad_center + QPoint(dpad_distance, 0), Direction::Right, dpad_arrow_size); | 682 | DrawArrow(p, dpad_center + QPointF(dpad_distance, 0), Direction::Right, dpad_arrow_size); |
| 681 | DrawArrow(p, dpad_center + QPoint(0, dpad_distance), Direction::Down, dpad_arrow_size); | 683 | DrawArrow(p, dpad_center + QPointF(0, dpad_distance), Direction::Down, dpad_arrow_size); |
| 682 | DrawArrow(p, dpad_center + QPoint(0, -dpad_distance), Direction::Up, dpad_arrow_size); | 684 | DrawArrow(p, dpad_center + QPointF(0, -dpad_distance), Direction::Up, dpad_arrow_size); |
| 683 | DrawArrow(p, dpad_center + QPoint(-dpad_distance, 0), Direction::Left, dpad_arrow_size); | 685 | DrawArrow(p, dpad_center + QPointF(-dpad_distance, 0), Direction::Left, dpad_arrow_size); |
| 684 | 686 | ||
| 685 | // ZL and ZR buttons | 687 | // ZL and ZR buttons |
| 686 | p.setPen(colors.outline); | 688 | p.setPen(colors.outline); |