mirror of
https://github.com/QB64-Phoenix-Edition/QB64pe.git
synced 2024-07-01 12:40:36 +00:00
Fix to custom font error-checking routine which used an invalid variable name and always failed.
Made use of _SCREENHIDE function so we don't update the IDE position when the screen is hidden.
This commit is contained in:
parent
91e7ace500
commit
eb69e62827
|
@ -20788,6 +20788,11 @@ int32 func__printwidth(qbs* text, int32 screenhandle, int32 passed){
|
|||
static int32 fh,result;
|
||||
static int64 bytes;
|
||||
fh=gfs_open(f,1,0,0);
|
||||
|
||||
#ifdef QB64_WINDOWS //rather than just immediately tossing an error, let's try looking in the default OS folder for the font first in case the use left off the filepath.
|
||||
if (fh<0) {fh=gfs_open(qbs_add(qbs_new_txt_len("C:/Windows/Fonts/",17),f),1,0,0);}
|
||||
#endif
|
||||
|
||||
if (fh<0) return -1;
|
||||
bytes=gfs_lof(fh);
|
||||
static uint8* content;
|
||||
|
|
|
@ -200,7 +200,7 @@ IF LoadedIDESettings = 0 THEN
|
|||
|
||||
result = ReadConfigSetting("IDE_CustomFont$", value$)
|
||||
idecustomfontfile$ = value$
|
||||
if result = 0 OR idecustomfont$ = "" then
|
||||
if result = 0 OR idecustomfontfile$ = "" then
|
||||
WriteConfigSetting "'[IDE DISPLAY SETTINGS]", "IDE_CustomFont$", "c:\windows\fonts\lucon.ttf"
|
||||
idecustomfontfile$ = "c:\windows\fonts\lucon.ttf"
|
||||
end if
|
||||
|
|
|
@ -626,11 +626,13 @@ DO
|
|||
idedeltxt 'removes temporary strings (typically created by guibox commands) by setting an index to 0
|
||||
STATIC ForceResize
|
||||
if IDE_AutoPosition then
|
||||
if _SCreenhide = 0 then
|
||||
IF IDE_TopPosition <> _SCREENY OR IDE_LeftPosition <> _SCREENX THEN
|
||||
WriteConfigSetting "'[IDE DISPLAY SETTINGS]", "IDE_TopPosition" , str$(_SCREENY)
|
||||
WriteConfigSetting "'[IDE DISPLAY SETTINGS]", "IDE_LeftPosition" , str$(_SCREENX)
|
||||
IDE_TopPosition = _SCREENY: IDE_LeftPosition = _SCREENX
|
||||
END IF
|
||||
end if
|
||||
end if
|
||||
|
||||
IF _RESIZE or ForceResize THEN
|
||||
|
|
Loading…
Reference in a new issue