mirror of
https://git.eden-emu.dev/eden-emu/eden.git
synced 2026-08-16 13:22:41 +00:00
ad2e1cc554
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>
55 lines
1.8 KiB
C++
55 lines
1.8 KiB
C++
// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
|
|
// SPDX-License-Identifier: GPL-3.0-or-later
|
|
|
|
// SPDX-FileCopyrightText: Copyright 2022 yuzu Emulator Project
|
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
|
|
|
#include <cstdlib>
|
|
#include <memory>
|
|
#include <string>
|
|
|
|
#include <fmt/ranges.h>
|
|
|
|
#include "common/logging.h"
|
|
#include "common/scm_rev.h"
|
|
#include "video_core/renderer_null/renderer_null.h"
|
|
#include "yuzu_cmd/emu_window/emu_window_sdl3_null.h"
|
|
|
|
#ifdef YUZU_USE_EXTERNAL_SDL3
|
|
// Include this before SDL.h to prevent the external from including a dummy
|
|
#define USING_GENERATED_CONFIG_H
|
|
#include <SDL3/SDL_config.h>
|
|
#endif
|
|
|
|
#include <SDL3/SDL.h>
|
|
|
|
EmuWindow_SDL3_Null::EmuWindow_SDL3_Null(InputCommon::InputSubsystem* input_subsystem_,
|
|
Core::System& system_, bool fullscreen)
|
|
: EmuWindow_SDL3{input_subsystem_, system_} {
|
|
const std::string window_title = fmt::format("Eden {} | {}-{} (Vulkan)", Common::g_build_name,
|
|
Common::g_scm_branch, Common::g_scm_desc);
|
|
render_window =
|
|
SDL_CreateWindow(window_title.c_str(), Layout::ScreenUndocked::Width,
|
|
Layout::ScreenUndocked::Height,
|
|
SDL_WINDOW_RESIZABLE | SDL_WINDOW_HIGH_PIXEL_DENSITY);
|
|
|
|
SetWindowIcon();
|
|
|
|
if (fullscreen) {
|
|
Fullscreen();
|
|
ShowCursor(false);
|
|
}
|
|
|
|
OnResize();
|
|
OnMinimalClientAreaChangeRequest(GetActiveConfig().min_client_area_size);
|
|
SDL_PumpEvents();
|
|
LOG_INFO(Frontend, "Eden Version: {} | {}-{} (Null)", Common::g_build_name,
|
|
Common::g_scm_branch, Common::g_scm_desc);
|
|
}
|
|
|
|
EmuWindow_SDL3_Null::~EmuWindow_SDL3_Null() = default;
|
|
|
|
std::unique_ptr<Core::Frontend::GraphicsContext> EmuWindow_SDL3_Null::CreateSharedContext() const {
|
|
return std::make_unique<DummyContext>();
|
|
}
|