| 03a3459e Andy McCall |
1 |
|
| 2 |
|
| 3 |
#include <SDL.h> |
| 4 |
#include <SDL_syswm.h> |
| 5 |
|
| 6 |
#include <windows.h> |
| 7 |
#include <dwmapi.h> |
| 8 |
|
| 9 |
void video_win32_set_rounded_corners(SDL_Window *window) |
| 10 |
{ |
| 11 |
SDL_SysWMinfo wmInfo; |
| 12 |
SDL_VERSION(&wmInfo.version); |
| 13 |
SDL_GetWindowWMInfo(window, &wmInfo); |
| 14 |
|
| 15 |
HWND hwnd = wmInfo.info.win.window; |
| 16 |
DWM_WINDOW_CORNER_PREFERENCE preference = DWMWCP_ROUNDSMALL; |
| 17 |
DwmSetWindowAttribute(hwnd, DWMWA_WINDOW_CORNER_PREFERENCE, &preference, sizeof(preference)); |
| 18 |
} |