1
1
Fork 0
mirror of https://github.com/QB64-Phoenix-Edition/QB64pe.git synced 2024-06-29 11:40:38 +00:00

Update libqb.cpp to allow manual compilation in WinXP

Oh, well... there's still life for XP.
This commit is contained in:
Fellippe Heitor 2021-10-17 03:56:54 -03:00
parent 4268f4457e
commit 0fac593dd6

View file

@ -18573,8 +18573,9 @@ void sub_put2(int32 i,int64 offset,void *element,int32 passed){
//Creating/destroying an image surface:
int32 func__newimage(int32 x,int32 y,int32 bpp,int32 passed){
#ifdef QB64_WINDOWS && WINVER >= 0x0600 //this block is not compatible with XP
static bool j;
#ifdef QB64_WINDOWS
#if WINVER >= 0x0600 //this block is not compatible with XP
static bool j;
if(j != 1){
FARPROC dpiaware;
HMODULE user32 = LoadLibrary(TEXT("user32.dll"));
@ -18588,6 +18589,7 @@ void sub_put2(int32 i,int64 offset,void *element,int32 passed){
FreeLibrary(user32);
}
}
#endif
#endif
static int32 i;
if (new_error) return 0;
@ -21556,7 +21558,12 @@ void sub_put2(int32 i,int64 offset,void *element,int32 passed){
}
else {
#ifdef QB64_WINDOWS
#if WINVER >= 0x0600
_putenv_s(buf, separator + 1);
#else
*separator = '=';
_putenv(buf);
#endif
#else
setenv(buf, separator + 1, 1);
#endif
@ -30011,7 +30018,8 @@ void sub__numlock(int32 options){
}
void sub__consolefont(qbs* FontName, int FontSize){
#ifdef QB64_WINDOWS && WINVER >= 0x0600 //this block is not compatible with XP
#ifdef QB64_WINDOWS
#if WINVER >= 0x0600 //this block is not compatible with XP
SECURITY_ATTRIBUTES SecAttribs = {sizeof(SECURITY_ATTRIBUTES), 0, 1};
HANDLE cl_conout = CreateFileA("CONOUT$", GENERIC_READ | GENERIC_WRITE, FILE_SHARE_READ | FILE_SHARE_WRITE, & SecAttribs, OPEN_EXISTING, 0, 0);
static int OneTimePause;
@ -30033,6 +30041,7 @@ void sub__consolefont(qbs* FontName, int FontSize){
SetCurrentConsoleFontEx(cl_conout, NULL, &info);
#endif
#endif
}