1
0
mirror of https://github.com/XProger/OpenLara.git synced 2025-03-14 16:19:41 +01:00

fix window alignment for low resolution displays

This commit is contained in:
XProger 2020-04-13 07:44:53 +03:00
parent 43ec236254
commit 65e5cd16bf
3 changed files with 14 additions and 6 deletions

View File

@ -145,7 +145,7 @@ const char *STR_IT[] = { ""
"[87500]E ci sarebbe questo gingillo:@un antichissimo artefatto dai poteri mistici" "[87500]E ci sarebbe questo gingillo:@un antichissimo artefatto dai poteri mistici"
"[92500]sepolto nella tomba perduta di Qualopec." "[92500]sepolto nella tomba perduta di Qualopec."
"[96000]E' ci$o che mi interessa." "[96000]E' ci$o che mi interessa."
"[98000]Potresti partire gi$a domani.@O hai già altri impegni per domani?" "[98000]Potresti partire gi$a domani.@O hai gi$a altri impegni per domani?"
/* LIFT */ , /* LIFT */ ,
"[49000]Sono stato riassegnato alle rovine di St. Francis,@nuove tentazioni mi tormentano." "[49000]Sono stato riassegnato alle rovine di St. Francis,@nuove tentazioni mi tormentano."
"[53500]Tra i fratelli gira voce che sepolto@sotto il nostro monastero riposi il corpo di Tihocan," "[53500]Tra i fratelli gira voce che sepolto@sotto il nostro monastero riposi il corpo di Tihocan,"
@ -210,7 +210,7 @@ const char *STR_IT[] = { ""
/* 22 */ , /* 22 */ ,
"[04000]Di nuovo qui?" "[04000]Di nuovo qui?"
"[05500]Anche tu - per la grande riapertura, suppongo." "[05500]Anche tu - per la grande riapertura, suppongo."
"[09500]L'evoluzione fluisce - la selezione naturale scorre più lenta che mai..." "[09500]L'evoluzione fluisce - la selezione naturale scorre pi$u lenta che mai..."
"[13500]un rifornimento di carne fresca risveglier$a il nostro orgoglio identitario" "[13500]un rifornimento di carne fresca risveglier$a il nostro orgoglio identitario"
"[17500] - ci rinforzer$a e ci avvantagger$a..." "[17500] - ci rinforzer$a e ci avvantagger$a..."
"[20500]Dar$a persino origine a nuove razze" "[20500]Dar$a persino origine a nuove razze"

View File

@ -57,14 +57,14 @@
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<LinkIncremental>true</LinkIncremental> <LinkIncremental>true</LinkIncremental>
<OutDir>..\..\..\bin\</OutDir> <OutDir>..\..\..\bin\</OutDir>
<IncludePath>..\..\;$(VC_IncludePath);$(WindowsSdk_71A_IncludePath);</IncludePath> <IncludePath>..\..\libs\;..\..\;$(VC_IncludePath);$(WindowsSdk_71A_IncludePath);</IncludePath>
<LibraryPath>..\..\libs\openvr\;$(VC_LibraryPath_x86);$(WindowsSdk_71A_LibraryPath_x86);</LibraryPath> <LibraryPath>..\..\libs\openvr\;$(VC_LibraryPath_x86);$(WindowsSdk_71A_LibraryPath_x86);</LibraryPath>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<LinkIncremental>false</LinkIncremental> <LinkIncremental>false</LinkIncremental>
<OutDir>..\..\..\bin\</OutDir> <OutDir>..\..\..\bin\</OutDir>
<GenerateManifest>false</GenerateManifest> <GenerateManifest>false</GenerateManifest>
<IncludePath>..\..\;$(VC_IncludePath);$(WindowsSdk_71A_IncludePath);</IncludePath> <IncludePath>..\..\libs\;..\..\;$(VC_IncludePath);$(WindowsSdk_71A_IncludePath);</IncludePath>
<LibraryPath>..\..\libs\openvr\;$(VC_LibraryPath_x86);$(WindowsSdk_71A_LibraryPath_x86);</LibraryPath> <LibraryPath>..\..\libs\openvr\;$(VC_LibraryPath_x86);$(WindowsSdk_71A_LibraryPath_x86);</LibraryPath>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Profile|Win32'"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Profile|Win32'">

View File

@ -931,12 +931,20 @@ int CALLBACK WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLi
CreateDirectory(cacheDir, NULL); CreateDirectory(cacheDir, NULL);
RECT r = { 0, 0, 1280, 720 }; RECT r = { 0, 0, 1280, 720 };
int sw = GetSystemMetrics(SM_CXSCREEN);
int sh = GetSystemMetrics(SM_CYSCREEN);
if (sw <= r.right || sh <= r.bottom) {
r.right /= 2;
r.bottom /= 2;
}
AdjustWindowRect(&r, WS_OVERLAPPEDWINDOW, false); AdjustWindowRect(&r, WS_OVERLAPPEDWINDOW, false);
#ifndef _DEBUG #ifndef _DEBUG
{ {
int ox = (GetSystemMetrics(SM_CXSCREEN) - (r.right - r.left)) / 2; int ox = (sw - (r.right - r.left)) / 2;
int oy = (GetSystemMetrics(SM_CYSCREEN) - (r.bottom - r.top)) / 2; int oy = (sh - (r.bottom - r.top)) / 2;
r.left += ox; r.left += ox;
r.top += oy; r.top += oy;
r.right += ox; r.right += ox;