mirror of
https://github.com/QB64Official/qb64.git
synced 2024-07-05 01:50:25 +00:00
Update libqb.cpp to allow manual compilation in WinXP
Oh, well... there's still life for XP.
This commit is contained in:
parent
4268f4457e
commit
0fac593dd6
|
@ -18573,8 +18573,9 @@ void sub_put2(int32 i,int64 offset,void *element,int32 passed){
|
||||||
//Creating/destroying an image surface:
|
//Creating/destroying an image surface:
|
||||||
|
|
||||||
int32 func__newimage(int32 x,int32 y,int32 bpp,int32 passed){
|
int32 func__newimage(int32 x,int32 y,int32 bpp,int32 passed){
|
||||||
#ifdef QB64_WINDOWS && WINVER >= 0x0600 //this block is not compatible with XP
|
#ifdef QB64_WINDOWS
|
||||||
static bool j;
|
#if WINVER >= 0x0600 //this block is not compatible with XP
|
||||||
|
static bool j;
|
||||||
if(j != 1){
|
if(j != 1){
|
||||||
FARPROC dpiaware;
|
FARPROC dpiaware;
|
||||||
HMODULE user32 = LoadLibrary(TEXT("user32.dll"));
|
HMODULE user32 = LoadLibrary(TEXT("user32.dll"));
|
||||||
|
@ -18588,6 +18589,7 @@ void sub_put2(int32 i,int64 offset,void *element,int32 passed){
|
||||||
FreeLibrary(user32);
|
FreeLibrary(user32);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
static int32 i;
|
static int32 i;
|
||||||
if (new_error) return 0;
|
if (new_error) return 0;
|
||||||
|
@ -21556,7 +21558,12 @@ void sub_put2(int32 i,int64 offset,void *element,int32 passed){
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
#ifdef QB64_WINDOWS
|
#ifdef QB64_WINDOWS
|
||||||
|
#if WINVER >= 0x0600
|
||||||
_putenv_s(buf, separator + 1);
|
_putenv_s(buf, separator + 1);
|
||||||
|
#else
|
||||||
|
*separator = '=';
|
||||||
|
_putenv(buf);
|
||||||
|
#endif
|
||||||
#else
|
#else
|
||||||
setenv(buf, separator + 1, 1);
|
setenv(buf, separator + 1, 1);
|
||||||
#endif
|
#endif
|
||||||
|
@ -30011,7 +30018,8 @@ void sub__numlock(int32 options){
|
||||||
}
|
}
|
||||||
|
|
||||||
void sub__consolefont(qbs* FontName, int FontSize){
|
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};
|
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);
|
HANDLE cl_conout = CreateFileA("CONOUT$", GENERIC_READ | GENERIC_WRITE, FILE_SHARE_READ | FILE_SHARE_WRITE, & SecAttribs, OPEN_EXISTING, 0, 0);
|
||||||
static int OneTimePause;
|
static int OneTimePause;
|
||||||
|
@ -30033,6 +30041,7 @@ void sub__consolefont(qbs* FontName, int FontSize){
|
||||||
|
|
||||||
SetCurrentConsoleFontEx(cl_conout, NULL, &info);
|
SetCurrentConsoleFontEx(cl_conout, NULL, &info);
|
||||||
#endif
|
#endif
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue