mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-10-17 23:31:45 +00:00
Clang-Tidy fixes (#6725)
This commit is contained in:
@@ -158,17 +158,19 @@ static void WIN_AdjustWindowRectWithStyle(SDL_Window *window, DWORD style, BOOL
|
||||
|
||||
screen_rect.left = *x;
|
||||
screen_rect.top = *y;
|
||||
screen_rect.right = *x + *width;
|
||||
screen_rect.bottom = *y + *height;
|
||||
screen_rect.right = (LONG)*x + *width;
|
||||
screen_rect.bottom = (LONG)*y + *height;
|
||||
|
||||
mon = MonitorFromRect(&screen_rect, MONITOR_DEFAULTTONEAREST);
|
||||
|
||||
/* GetDpiForMonitor docs promise to return the same hdpi / vdpi */
|
||||
if (videodata->GetDpiForMonitor(mon, MDT_EFFECTIVE_DPI, &frame_dpi, &unused) != S_OK) {
|
||||
frame_dpi = 96;
|
||||
}
|
||||
if (videodata != NULL) {
|
||||
/* GetDpiForMonitor docs promise to return the same hdpi / vdpi */
|
||||
if (videodata->GetDpiForMonitor(mon, MDT_EFFECTIVE_DPI, &frame_dpi, &unused) != S_OK) {
|
||||
frame_dpi = 96;
|
||||
}
|
||||
|
||||
videodata->AdjustWindowRectExForDpi(&rect, style, menu, 0, frame_dpi);
|
||||
videodata->AdjustWindowRectExForDpi(&rect, style, menu, 0, frame_dpi);
|
||||
}
|
||||
} else {
|
||||
AdjustWindowRectEx(&rect, style, menu, 0);
|
||||
}
|
||||
@@ -585,7 +587,7 @@ int WIN_CreateWindowFrom(_THIS, SDL_Window *window, const void *data)
|
||||
the window to share a pixel format with
|
||||
*/
|
||||
SDL_Window *otherWindow = NULL;
|
||||
SDL_sscanf(hint, "%p", (void **)&otherWindow);
|
||||
(void)SDL_sscanf(hint, "%p", (void **)&otherWindow);
|
||||
|
||||
/* Do some error checking on the pointer */
|
||||
if (otherWindow != NULL && otherWindow->magic == &_this->window_magic) {
|
||||
@@ -1305,7 +1307,7 @@ int WIN_SetWindowOpacity(_THIS, SDL_Window *window, float opacity)
|
||||
return -1;
|
||||
#else
|
||||
const SDL_WindowData *data = (SDL_WindowData *)window->driverdata;
|
||||
const HWND hwnd = data->hwnd;
|
||||
HWND hwnd = data->hwnd;
|
||||
const LONG style = GetWindowLong(hwnd, GWL_EXSTYLE);
|
||||
|
||||
SDL_assert(style != 0);
|
||||
|
Reference in New Issue
Block a user