aboutsummaryrefslogtreecommitdiff
path: root/src/yuzu_cmd/emu_window/emu_window_sdl2.cpp
Commit message (Collapse)AuthorAgeFilesLines
* [externals] Update to SDL3 (#3952)Kaydax2026-05-181-262/+0
| | | | | | | | | | | | | | | | | | | | Since the launch of the steam controller I think it's only best to push towards updating to SDL3 allowing for a wider range of controller support I went ahead and started on getting it working. Everything here should be functional, I've personally tested it all on Arch Linux. Still untested on windows, so looking for feedback on that Any feedback and help would be appreciated! Main changes: - Bump everything to SDL3 - Handle SDL3 audio and input - Add steam controller support, including HD Rumble - Improved battery reporting via the status icon by using real % rather than state alone Co-authored-by: crueter <crueter@eden-emu.dev> Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/3952 Reviewed-by: crueter <crueter@eden-emu.dev> Reviewed-by: MaranBr <maranbr@eden-emu.dev> Reviewed-by: Lizzie <lizzie@eden-emu.dev>
* [common/logging] Simplify logging logic and fix issues when logging before ↵lizzie2026-03-121-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | system is created (#3688) - our logging code was bigger than spdlog itself, why???? just keep it simple - fix issues when logging before logging system is even started - removes the "initialized logging twice" issue - removes uneeded indirection in file logging - uses direct formatting instead of jumping hoopla-around the fmt::format() ressult - code duplication and dead code removal as usual I did explore dup2() but I think it's not worth the hassle I did try `fwopen()` but it's better if things are just kept as-is. there is a lot of noise because I removed a bunch of redundant files on logging and just put everything in one file now normally this wouldn't be a good idea, however consider: the complexity of logging; it's less than 500 lines... does it really need a whole subsystem?!?!?! ITS JUST LOGGING Signed-off-by: lizzie <lizzie@eden-emu.dev> Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/3688 Reviewed-by: crueter <crueter@eden-emu.dev> Reviewed-by: DraVee <chimera@dravee.dev> Reviewed-by: CamilleLaVey <camillelavey99@gmail.com> Co-authored-by: lizzie <lizzie@eden-emu.dev> Co-committed-by: lizzie <lizzie@eden-emu.dev>
* [meta] allow customisation of auto-updater, remove hardcoded title names and ↵lizzie2025-10-011-1/+1
| | | | | | | | | | | | | fix dup title names (#2588) Right now on all platforms, sdl2 will display something like "Eden Eden | master-8gd8fg8", this fixes so it only displays `Eden` (the REPO_NAME) once. Signed-off-by: lizzie <lizzie@eden-emu.dev> Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/2588 Reviewed-by: crueter <crueter@eden-emu.dev> Co-authored-by: lizzie <lizzie@eden-emu.dev> Co-committed-by: lizzie <lizzie@eden-emu.dev>
* [yuzu_cmd] fix HFA Wpsabi warning on aarch64 (#2554)lizzie2025-09-241-8/+14
| | | | | | | | Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/2554 Reviewed-by: MaranBr <maranbr@eden-emu.dev> Reviewed-by: crueter <crueter@eden-emu.dev> Co-authored-by: lizzie <lizzie@eden-emu.dev> Co-committed-by: lizzie <lizzie@eden-emu.dev>
* [desktop, core] yuzu -> Eden, eden -> Edencrueter2025-07-191-2/+2
| | | | Signed-off-by: crueter <crueter@eden-emu.dev>
* fix a large variety of issues (#101)swurl2025-05-111-5/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | - GLASM/SPIR-V mixup on Android - potential greenscreen fix (thx suyu) - save memory layout and add 10gb/12gb options - potential samsung gaming hub fix - fix layout of controller UI - fix default settings to sensible defaults. - note to TotK that you should increase memory layout - Error checking for Windows linking - fix an IDE error - improved migration system w/threading and busy indicator - disabled citron migration for now - replaced some user-facing legacy strings with eden - Added 10GB and 12GB DRAM layouts - Fix Android black screen issues - add discord link & update FAQ/Quickstart - update links in about page - add back rich presence - add Don't show again for desktop pre alpha banner - add citron warning to android and polaris to desktop Signed-off-by: swurl <swurl@swurl.xyz> Co-authored-by: Pavel Barabanov <pavelbarabanov94@gmail.com> Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/101 Co-authored-by: swurl <swurl@swurl.xyz> Co-committed-by: swurl <swurl@swurl.xyz>
* hid_core: Move hid to it's own subprojectNarr the Reg2024-01-051-1/+1
|
* yuzu_cmd: Report more SDL errorsNikita Strygin2023-12-301-1/+1
|
* input_common: Split mouse input into individual devicesNarr the Reg2023-02-161-2/+6
|
* yuzu_cmd: Fix mismatching controller inputgerman772023-02-041-2/+2
|
* yuzu_cmd: Fix touch inputgerman772023-02-041-28/+16
|
* emu_window_sdl2: Respect hidpiAlexander Orzechowski2022-12-131-1/+1
| | | | | | Use SDL_GL_GetDrawableSize instead of SDL_GetWindowSize which will return the true size our swapchain needs to be in even for hidpi displays.
* yuzu-cmd: Fix input callback crash on closegerman772022-11-271-0/+2
|
* chore: make yuzu REUSE compliantAndrea Pappacoda2022-07-271-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | [REUSE] is a specification that aims at making file copyright information consistent, so that it can be both human and machine readable. It basically requires that all files have a header containing copyright and licensing information. When this isn't possible, like when dealing with binary assets, generated files or embedded third-party dependencies, it is permitted to insert copyright information in the `.reuse/dep5` file. Oh, and it also requires that all the licenses used in the project are present in the `LICENSES` folder, that's why the diff is so huge. This can be done automatically with `reuse download --all`. The `reuse` tool also contains a handy subcommand that analyzes the project and tells whether or not the project is (still) compliant, `reuse lint`. Following REUSE has a few advantages over the current approach: - Copyright information is easy to access for users / downstream - Files like `dist/license.md` do not need to exist anymore, as `.reuse/dep5` is used instead - `reuse lint` makes it easy to ensure that copyright information of files like binary assets / images is always accurate and up to date To add copyright information of files that didn't have it I looked up who committed what and when, for each file. As yuzu contributors do not have to sign a CLA or similar I couldn't assume that copyright ownership was of the "yuzu Emulator Project", so I used the name and/or email of the commit author instead. [REUSE]: https://reuse.software Follow-up to b2eb10382941bef0914f4a0a4685b9033440aa9f
* yuzu-cmd: ignore bogus timeous from SDLLiam2022-06-101-1/+9
|
* input_common: touch: Rewrite touch driver to support multiple touch pointsgerman772022-05-231-1/+1
|
* emu_window_sdl2: Set window size to display dimensions for exclusive fullscreenlat9nq2022-03-151-6/+7
| | | | | Since SDL2 does not automatically resize the canvas when entering fullscreen mode, resize the window to desktop display dimensions.
* yuzu_cmd: Use new inputgerman772021-11-241-37/+35
|
* yuzu-cmd/CMakeLists: Correct attribution for this function.Fernando Sahmkow2021-08-081-0/+1
|
* yuzu-cmd: hide cursor when in fullscreensan2021-08-011-0/+4
| | | Exposed the SDL_ShowCursor function to EmuWindow baseclass. When creating the window (GL or VK) in fullscreen it now automatically hides the cursor.
* emu_window: Remove global system instancelat9nq2021-07-301-3/+3
| | | | | | | It was just the one in emu_window_sdl2, but since _gl and _vk inherit from it, they all needed adjustments. Leaves just the one auto system& in main().
* general: Implement FullscreenMode enumerationlat9nq2021-07-231-2/+2
| | | | | Prevents us from using an unclear 0 or 1 to describe the fullscreen mode.
* yuzu_cmd: Make use of fullscreen_mode settinglat9nq2021-07-211-15/+29
| | | | | | | Reverts 48259de0c1a6a1aca77eec31cb8aca5ca2b680dd to the previous hierarchy and fixes the resolution issue with this fullscreen mode. yuzu-cmd will now read the fullscreen_mode setting and use it appropriately.
* yuzu-cmd: Fullscreen Improvements (#6656)san2021-07-211-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * emu_window_sdl2_vk: Use the generated SDL config On Linux, due to the way we include SDL2 as a submodule, it makes it difficult for us to specify which SDL_config.h we intended to include. Before, CMake would default to the dummy one included with SDL and ignore the generated one. This tells CMake to use the generated one. In addition, we define USING_GENERATED_CONFIG_H to throw an error in case the dummy config is used by accident. Fixes Vulkan not working on Linux yuzu-cmd. * emu_window_sdl2_vk: Specify the window manager if it should be supported The original language "not implemented" is wrong if the implementation exists but is not compiled. This causes a bit of a debugging headache when it goes wrong. Log it if the window manager is known before exiting. * sdl_impl, emu_window: Remove clang ignore Fixed upstream by libsdl-org/SDL@25fc40b0bd44c484051064bc6b945ea9943f88dd * Enable fullscreen support for Vulkan on yuzu-cmd Hooked up the existing SDL2 logic for fullscreen support in the Vulkan window of yuzu-cmd. * Change fullscreen logic to attempt desktop resolution first on yuzu-cmd Changed the order in which we attempt to switch to fullscreen. First try desktop resolution first, if it fails fall back to streched fullscreen using windowed resolution. Co-authored-by: lat9nq <22451773+lat9nq@users.noreply.github.com> Co-authored-by: san <san+gitkraken@smederijmerlijn.nl>
* sdl_impl, emu_window: Remove clang ignorelat9nq2021-07-161-8/+0
| | | | | Fixed upstream by libsdl-org/SDL@25fc40b0bd44c484051064bc6b945ea9943f88dd
* perf_stats: Rework FPS counter to be more accurateameerj2021-05-151-1/+1
| | | | | | | | | The FPS counter was based on metrics in the nvdisp swapbuffers call. This metric would be accurate if the gpu thread/renderer were synchronous with the nvdisp service, but that's no longer the case. This commit moves the frame counting responsibility onto the concrete renderers after their frame draw calls. Resulting in more meaningful metrics. The displayed FPS is now made up of the average framerate between the previous and most recent update, in order to avoid distracting FPS counter updates when framerate is oscillating between close values. The status bar update frequency was also changed from 2 seconds to 500ms.
* emu_window: unsigned -> u32Lioncash2021-04-231-1/+1
| | | | This is more concise and consistent with the rest of the codebase.
* general: Ignore implicit-fallthrough for SDL.hlat9nq2021-04-181-0/+9
| | | | | | SDL 2.0.14 introduces an incompatibility with Clang, causing it to trigger -Wimplicit-fallthrough even though it is marked. Ignore it for now, with a comment mentioning why this is needed.
* inputCommon: Mouse fixesgerman772021-02-271-3/+21
|
* yuzu: Various frontend improvements to avoid crashes and improve experience ↵bunnei2021-02-141-0/+17
| | | | on Linux.
* Add mouse panninggerman2021-02-071-1/+2
|
* Add mutitouch support for touch screensgerman2021-01-151-6/+6
|
* Merge pull request #4939 from german77/MouseInputbunnei2020-11-291-4/+4
|\ | | | | InputCommon: Implement full mouse support
| * Implement full mouse supportgerman2020-11-251-4/+4
| |
* | Overhaul EmuWindow::PollEvents to fix yuzu-cmd calling SDL_PollEvents off ↵comex2020-11-231-49/+51
|/ | | | | | | | | | | | | | | | | | | | | | | | | | main thread EmuWindow::PollEvents was called from the GPU thread (or the CPU thread in sync-GPU mode) when swapping buffers. It had three implementations: - In GRenderWindow, it didn't actually poll events, just set a flag and emit a signal to indicate that a frame was displayed. - In EmuWindow_SDL2_Hide, it did nothing. - In EmuWindow_SDL2, it did call SDL_PollEvents, but this is wrong because SDL_PollEvents is supposed to be called on the thread that set up video - in this case, the main thread, which was sleeping in a busyloop (regardless of whether sync-GPU was enabled). On macOS this causes a crash. To fix this: - Rename EmuWindow::PollEvents to OnFrameDisplayed, and give it a default implementation that does nothing. - In EmuWindow_SDL2, do not override OnFrameDisplayed, but instead have the main thread call SDL_WaitEvent in a loop.
* renderer_opengl: Remove emulated mailbox presentationReinUsesLisp2020-09-201-3/+2
| | | | | Emulated mailbox presentation was causing performance issues on Nvidia's OpenGL driver. Remove it.
* input_common: Eliminate most global stateLioncash2020-08-271-8/+10
| | | | | | | | | | | | | Abstracts most of the input mechanisms under an InputSubsystem class that is managed by the frontends, eliminating any static constructors and destructors. This gets rid of global accessor functions and also allows the frontends to have a more fine-grained control over the lifecycle of the input subsystem. This also makes it explicit which interfaces rely on the input subsystem instead of making it opaque in the interface functions. All that remains to migrate over is the factories, which can be done in a separate change.
* Fix format error in performance statisticsH27CK2020-04-231-3/+4
| | | | Formatting
* frontend: sdl2: emu_window: Implement separate presentation thread.bunnei2020-02-251-1/+1
|
* yuzu: Implement Vulkan frontendReinUsesLisp2020-01-291-0/+4
| | | | | Adds a Qt and SDL2 frontend for Vulkan. It also finishes the missing bits on Vulkan initialization.
* SDL: Fix missing headerFernando Sahmkow2019-10-041-0/+1
| | | | This fixes linux and mingw builds.
* Add FPS to SDL title barjroweboy2019-09-221-0/+12
| | | | | | Also fix a small issue with incorrect shutdown ordering in SDL. Previously the system would still be running so the telemetry task didn't launch and detached_tasks would assert(count == 0)
* emu_window: Pass OnMinimalClientAreaChangeRequest argument by copyReinUsesLisp2019-05-261-2/+1
| | | | | There's no performance improvement in passing an unsigned pair by reference.
* yuzu_cmd: Split emu_window OpenGL implementation into its own fileReinUsesLisp2019-05-251-156/+15
|
* yuzu_cmd: Use OpenGL compat when asked in the settingsReinUsesLisp2019-05-171-1/+5
|
* Merge pull request #2017 from jroweboy/glwidgetbunnei2019-04-131-1/+36
|\ | | | | Frontend: Migrate to QOpenGLWindow and support shared contexts
| * SDL Frontend: Add shared context supportJames Rowe2019-01-211-1/+36
| |
* | Input: Remove global variables from SDL InputJames Rowe2019-03-021-8/+5
| | | | | | | | | | | | | | | | | | Changes the interface as well to remove any unique methods that frontends needed to call such as StartJoystickEventHandler by conditionally starting the polling thread only if the frontend hasn't started it already. Additionally, moves all global state into a single SDLState class in order to guarantee that the destructors are called in the proper order
* | citra_qt: Log settings on launchzhupengfei2019-01-221-0/+1
|/
* gl_rasterizer: Remove extension booleansReinUsesLisp2018-11-281-0/+2
|