From 792cb23ddd3d060ab5c9bd3bafab4babb2f4aab7 Mon Sep 17 00:00:00 2001 From: pineappleEA Date: Thu, 12 Aug 2021 21:26:44 +0200 Subject: [PATCH] early-access version 1991 --- README.md | 2 +- src/input_common/sdl/sdl_impl.cpp | 3 +++ src/video_core/command_classes/vic.cpp | 5 ++--- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 12eb27a2c..03ee1a8ab 100755 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ yuzu emulator early access ============= -This is the source code for early-access 1990. +This is the source code for early-access 1991. ## Legal Notice diff --git a/src/input_common/sdl/sdl_impl.cpp b/src/input_common/sdl/sdl_impl.cpp index f1f950d8a..f102410d1 100755 --- a/src/input_common/sdl/sdl_impl.cpp +++ b/src/input_common/sdl/sdl_impl.cpp @@ -889,6 +889,9 @@ SDLState::SDLState() { RegisterFactory("sdl", vibration_factory); RegisterFactory("sdl", motion_factory); + // Disable raw input. When enabled this setting causes SDL to die when a web applet opens + SDL_SetHint(SDL_HINT_JOYSTICK_RAWINPUT, "0"); + // Enable HIDAPI rumble. This prevents SDL from disabling motion on PS4 and PS5 controllers SDL_SetHint(SDL_HINT_JOYSTICK_HIDAPI_PS4_RUMBLE, "1"); SDL_SetHint(SDL_HINT_JOYSTICK_HIDAPI_PS5_RUMBLE, "1"); diff --git a/src/video_core/command_classes/vic.cpp b/src/video_core/command_classes/vic.cpp index d5e77941c..0ee07f398 100755 --- a/src/video_core/command_classes/vic.cpp +++ b/src/video_core/command_classes/vic.cpp @@ -96,12 +96,11 @@ void Vic::Execute() { if (!converted_frame_buffer) { converted_frame_buffer = AVMallocPtr{static_cast(av_malloc(linear_size)), av_free}; } - - const int converted_stride{frame->width * 4}; + const std::array converted_stride{frame->width * 4, frame->height * 4, 0, 0}; u8* const converted_frame_buf_addr{converted_frame_buffer.get()}; sws_scale(scaler_ctx, frame->data, frame->linesize, 0, frame->height, - &converted_frame_buf_addr, &converted_stride); + &converted_frame_buf_addr, converted_stride.data()); const u32 blk_kind = static_cast(config.block_linear_kind); if (blk_kind != 0) {