Skip to content

Commit

Permalink
remove redundant window.setFlags() and pass window_settings to presen…
Browse files Browse the repository at this point in the history
…ter by value
  • Loading branch information
ZzzhHe authored and heinezen committed Dec 7, 2024
1 parent 87da14e commit 8094dc6
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion libopenage/presenter/presenter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ Presenter::Presenter(const util::Path &root_dir,
time_loop{time_loop} {}


void Presenter::run(const renderer::window_settings &window_settings) {
void Presenter::run(const renderer::window_settings window_settings) {
log::log(INFO << "Presenter: Launching subsystems...");

this->init_graphics(window_settings);
Expand Down
2 changes: 1 addition & 1 deletion libopenage/presenter/presenter.h
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ class Presenter {
*
* @param window_settings The settings to customize the display window (e.g. size, display mode, vsync).
*/
void run(const renderer::window_settings &window_settings = {});
void run(const renderer::window_settings window_settings = {});

/**
* Set the game simulation controlled by this presenter.
Expand Down
2 changes: 1 addition & 1 deletion libopenage/renderer/opengl/window.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ GlWindow::GlWindow(const std::string &title,
this->window->setWindowState(Qt::WindowNoState);
switch (settings.mode) {
case window_mode::WINDOWED:
this->window->setFlags(this->window->flags() & ~Qt::FramelessWindowHint);
// nothing to do because it's the default
break;
case window_mode::BORDERLESS:
this->window->setFlags(this->window->flags() | Qt::FramelessWindowHint);
Expand Down

0 comments on commit 8094dc6

Please sign in to comment.