mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2025-08-20 21:33:40 -07:00
use ini window resolution (#410)
* use ini window resolution * use arguments for directx window size * default 640x480 not 320x240 * kick off a build * and revert * default config 640x480 not 320x240 * add todo Co-authored-by: briaguya <briaguya@alice>
This commit is contained in:
parent
306cfd0654
commit
1ad2931f80
8 changed files with 29 additions and 20 deletions
|
@ -278,7 +278,7 @@ static LRESULT CALLBACK gfx_dxgi_wnd_proc(HWND h_wnd, UINT message, WPARAM w_par
|
|||
return 0;
|
||||
}
|
||||
|
||||
void gfx_dxgi_init(const char *game_name, bool start_in_fullscreen) {
|
||||
void gfx_dxgi_init(const char *game_name, bool start_in_fullscreen, uint32_t width, uint32_t height) {
|
||||
LARGE_INTEGER qpc_init, qpc_freq;
|
||||
QueryPerformanceCounter(&qpc_init);
|
||||
QueryPerformanceFrequency(&qpc_freq);
|
||||
|
@ -319,7 +319,7 @@ void gfx_dxgi_init(const char *game_name, bool start_in_fullscreen) {
|
|||
|
||||
run_as_dpi_aware([&] () {
|
||||
// We need to be dpi aware when calculating the size
|
||||
RECT wr = {0, 0, DESIRED_SCREEN_WIDTH, DESIRED_SCREEN_HEIGHT};
|
||||
RECT wr = {0, 0, width, height};
|
||||
AdjustWindowRect(&wr, WS_OVERLAPPEDWINDOW, FALSE);
|
||||
|
||||
dxgi.h_wnd = CreateWindowW(WINCLASS_NAME, w_title, WS_OVERLAPPEDWINDOW,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue