mirror of
https://github.com/Relintai/sfw.git
synced 2024-11-08 07:52:09 +01:00
Fixed clang format warnings.
This commit is contained in:
parent
5b13577a54
commit
0b04af1fb3
@ -559,9 +559,10 @@ uint64_t AppWindow::frame() {
|
|||||||
}
|
}
|
||||||
void AppWindow::set_title(const char *title_) {
|
void AppWindow::set_title(const char *title_) {
|
||||||
snprintf(title, 128, "%s", title_);
|
snprintf(title, 128, "%s", title_);
|
||||||
if (!title[0])
|
if (!title[0]) {
|
||||||
glfwSetWindowTitle(_window, title);
|
glfwSetWindowTitle(_window, title);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
void AppWindow::set_color(unsigned color) {
|
void AppWindow::set_color(unsigned color) {
|
||||||
unsigned r = (color >> 0) & 255;
|
unsigned r = (color >> 0) & 255;
|
||||||
unsigned g = (color >> 8) & 255;
|
unsigned g = (color >> 8) & 255;
|
||||||
@ -810,8 +811,9 @@ AppWindow::MouseMode AppWindow::get_mouse_mode() const {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void AppWindow::set_visible(int visible) {
|
void AppWindow::set_visible(int visible) {
|
||||||
if (!_window)
|
if (!_window) {
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
//if(window) (visible ? glfwRestoreWindow : glfwIconifyWindow)(window);
|
//if(window) (visible ? glfwRestoreWindow : glfwIconifyWindow)(window);
|
||||||
(visible ? glfwShowWindow : glfwHideWindow)(_window);
|
(visible ? glfwShowWindow : glfwHideWindow)(_window);
|
||||||
@ -829,8 +831,10 @@ double AppWindow::get_aspect() {
|
|||||||
return (double)w / (h + !h);
|
return (double)w / (h + !h);
|
||||||
}
|
}
|
||||||
void AppWindow::aspect_lock(unsigned numer, unsigned denom) {
|
void AppWindow::aspect_lock(unsigned numer, unsigned denom) {
|
||||||
if (!_window)
|
if (!_window) {
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (numer * denom != 0) {
|
if (numer * denom != 0) {
|
||||||
glfwSetWindowAspectRatio(_window, numer, denom);
|
glfwSetWindowAspectRatio(_window, numer, denom);
|
||||||
} else {
|
} else {
|
||||||
@ -838,8 +842,10 @@ void AppWindow::aspect_lock(unsigned numer, unsigned denom) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
void AppWindow::aspect_unlock() {
|
void AppWindow::aspect_unlock() {
|
||||||
if (!_window)
|
if (!_window) {
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
AppWindow::aspect_lock(0, 0);
|
AppWindow::aspect_lock(0, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user