Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set the icon on window regeneration #3081

Merged
merged 2 commits into from Nov 2, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
9 changes: 4 additions & 5 deletions src/gui/sdlmain.cpp
Expand Up @@ -316,9 +316,9 @@ void GFX_SetTitle(const int32_t new_num_cycles, const bool is_paused = false)
char title_buf[200] = {0};

#if !defined(NDEBUG)
#define APP_NAME_STR "DOSBox Staging (debug build)"
#define APP_NAME_STR DOSBOX_NAME " (debug build)"
#else
#define APP_NAME_STR "DOSBox Staging"
#define APP_NAME_STR DOSBOX_NAME
#endif

auto &num_cycles = sdl.title_bar.num_cycles;
Expand Down Expand Up @@ -3403,6 +3403,8 @@ static void set_output(Section* sec, const bool wants_aspect_ratio_correction)
const auto transparency = clamp(section->Get_int("transparency"), 0, 90);
const auto alpha = static_cast<float>(100 - transparency) / 100.0f;
SDL_SetWindowOpacity(sdl.window, alpha);
SDL_SetWindowTitle(sdl.window, APP_NAME_STR);
SetIcon();
weirddan455 marked this conversation as resolved.
Show resolved Hide resolved

RENDER_Reinit();
}
Expand Down Expand Up @@ -3554,9 +3556,6 @@ static void GUI_StartUp(Section *sec)

set_output(section, RENDER_IsAspectRatioCorrectionEnabled());

SDL_SetWindowTitle(sdl.window, "DOSBox Staging");
SetIcon();

/* Get some Event handlers */
MAPPER_AddHandler(GFX_RequestExit, SDL_SCANCODE_F9, PRIMARY_MOD,
"shutdown", "Shutdown");
Expand Down