OXYGENHUB
◆ riscv-1 x16-emulator / src / video_win32.c
479 B · C · last changed chore(): initial commit 15 days ago source blame history raw
1
// All rights reserved. License: 2-clause BSD
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
}