mirror of
https://github.com/hedge-dev/UnleashedRecomp
synced 2026-08-31 18:02:51 -04:00
Implemented master volume slider
This commit is contained in:
@@ -147,25 +147,26 @@ int Window_OnSDLEvent(void*, SDL_Event* event)
|
||||
return 0;
|
||||
}
|
||||
|
||||
void GameWindow::Init(const char *sdlVideoDriver)
|
||||
void GameWindow::Init(const char* sdlVideoDriver)
|
||||
{
|
||||
#ifdef __linux__
|
||||
SDL_SetHint("SDL_APP_ID", "io.github.hedge_dev.unleashedrecomp");
|
||||
#endif
|
||||
|
||||
int videoRes = SDL_VideoInit(sdlVideoDriver);
|
||||
if (videoRes != 0 && sdlVideoDriver != nullptr)
|
||||
if (SDL_VideoInit(sdlVideoDriver) != 0 && sdlVideoDriver)
|
||||
{
|
||||
fmt::println("Failed to initialize the specified SDL Video Driver {}. Falling back to default.", sdlVideoDriver);
|
||||
LOGFN_ERROR("Failed to initialise the SDL video driver: \"{}\". Falling back to default.", sdlVideoDriver);
|
||||
SDL_VideoInit(nullptr);
|
||||
}
|
||||
|
||||
const char* videoDriverName = SDL_GetCurrentVideoDriver();
|
||||
if (videoDriverName != nullptr)
|
||||
fmt::println("SDL Video Driver: {}", videoDriverName);
|
||||
auto videoDriverName = SDL_GetCurrentVideoDriver();
|
||||
|
||||
if (videoDriverName)
|
||||
LOGFN("SDL video driver: \"{}\"", videoDriverName);
|
||||
|
||||
SDL_EventState(SDL_SYSWMEVENT, SDL_ENABLE);
|
||||
SDL_AddEventWatch(Window_OnSDLEvent, s_pWindow);
|
||||
|
||||
#ifdef _WIN32
|
||||
SetProcessDPIAware();
|
||||
#endif
|
||||
|
||||
@@ -825,6 +825,7 @@ static void DrawConfigOptions()
|
||||
break;
|
||||
|
||||
case 2: // AUDIO
|
||||
DrawConfigOption(rowCount++, yOffset, &Config::MasterVolume, true);
|
||||
DrawConfigOption(rowCount++, yOffset, &Config::MusicVolume, true);
|
||||
DrawConfigOption(rowCount++, yOffset, &Config::EffectsVolume, true);
|
||||
DrawConfigOption(rowCount++, yOffset, &Config::VoiceLanguage, OptionsMenu::s_pauseMenuType == SWA::eMenuType_WorldMap, cmnReason);
|
||||
|
||||
@@ -21,6 +21,7 @@
|
||||
#include <res/images/options_menu/thumbnails/invert_camera_x.dds.h>
|
||||
#include <res/images/options_menu/thumbnails/invert_camera_y.dds.h>
|
||||
#include <res/images/options_menu/thumbnails/language.dds.h>
|
||||
#include <res/images/options_menu/thumbnails/master_volume.dds.h>
|
||||
#include <res/images/options_menu/thumbnails/monitor.dds.h>
|
||||
#include <res/images/options_menu/thumbnails/motion_blur_off.dds.h>
|
||||
#include <res/images/options_menu/thumbnails/motion_blur_original.dds.h>
|
||||
@@ -77,6 +78,7 @@ void LoadThumbnails()
|
||||
g_configThumbnails[&Config::AllowBackgroundInput] = LOAD_ZSTD_TEXTURE(g_allow_background_input);
|
||||
g_configThumbnails[&Config::AllowDPadMovement] = LOAD_ZSTD_TEXTURE(g_allow_dpad_movement);
|
||||
g_configThumbnails[&Config::ControllerIcons] = LOAD_ZSTD_TEXTURE(g_controller_icons);
|
||||
g_configThumbnails[&Config::MasterVolume] = LOAD_ZSTD_TEXTURE(g_master_volume);
|
||||
g_configThumbnails[&Config::MusicVolume] = LOAD_ZSTD_TEXTURE(g_music_volume);
|
||||
g_configThumbnails[&Config::EffectsVolume] = LOAD_ZSTD_TEXTURE(g_effects_volume);
|
||||
g_configThumbnails[&Config::VoiceLanguage] = LOAD_ZSTD_TEXTURE(g_voice_language);
|
||||
|
||||
@@ -29,7 +29,7 @@ inline void SDL_MoveEvent(SDL_Window* pWindow, int x, int y)
|
||||
SDL_PushEvent(&event);
|
||||
}
|
||||
|
||||
inline void SDL_User_EvilSonic(SDL_Window* pWindow, bool isCtor)
|
||||
inline void SDL_User_EvilSonic(bool isCtor)
|
||||
{
|
||||
SDL_Event event{};
|
||||
event.type = SDL_USER_EVILSONIC;
|
||||
|
||||
Reference in New Issue
Block a user