fix reset TTF screen

This commit is contained in:
Wengier 2021-07-31 02:15:10 -04:00
parent f92b262324
commit a1d8a72902
4 changed files with 22 additions and 9 deletions

View File

@ -157,6 +157,9 @@
(introduced in version 0.83.15). (Wengier) (introduced in version 0.83.15). (Wengier)
- Fixed line endings for SBCS language files such as - Fixed line endings for SBCS language files such as
English and Spanish translations. (Wengier) English and Spanish translations. (Wengier)
- Fixed resetting the TTF screen when exiting from
Configuration Tool or Mapper Editor when TrueType
font (TTF) output is active. (Wengier)
- Fixed the option "drive z expand path" not working - Fixed the option "drive z expand path" not working
if Virtual Drive Z: has been moved to a different if Virtual Drive Z: has been moved to a different
drive letter (e.g. Drive Y:). (Wengier) drive letter (e.g. Drive Y:). (Wengier)

View File

@ -394,8 +394,6 @@ messages in such languages. There are several language files available in the DO
* Spanish language file: [contrib/translations/es/es_ES.lng](https://github.com/joncampbell123/dosbox-x/blob/master/contrib/translations/es/es_ES.lng) * Spanish language file: [contrib/translations/es/es_ES.lng](https://github.com/joncampbell123/dosbox-x/blob/master/contrib/translations/es/es_ES.lng)
Additional guides and tips for making translations on the Windows platform are available from: [README.translation](https://github.com/joncampbell123/dosbox-x/blob/develop/contrib/translations/docs/README.translation.MD)
The fact that DOSBox-X was developed around the U.S. keyboard layout is primarily due to limitations around the SDL1 The fact that DOSBox-X was developed around the U.S. keyboard layout is primarily due to limitations around the SDL1
library which provides input handling. As such when using the SDL1 version and a non-US keyboard, DOSBox-X automatically library which provides input handling. As such when using the SDL1 version and a non-US keyboard, DOSBox-X automatically
uses scancodes with the default setting to work around keyboard layout issues. Scancodes are not needed when using uses scancodes with the default setting to work around keyboard layout issues. Scancodes are not needed when using

View File

@ -86,6 +86,7 @@ extern bool dos_kernel_disabled, confres, swapad, font_14_init;
extern Bitu currentWindowWidth, currentWindowHeight; extern Bitu currentWindowWidth, currentWindowHeight;
extern std::string strPasteBuffer, langname; extern std::string strPasteBuffer, langname;
extern void resetFontSize(void);
extern void PasteClipboard(bool bPressed); extern void PasteClipboard(bool bPressed);
extern bool MSG_Write(const char *, const char *); extern bool MSG_Write(const char *, const char *);
extern void LoadMessageFile(const char * fname); extern void LoadMessageFile(const char * fname);
@ -573,7 +574,12 @@ static void UI_Shutdown(GUI::ScreenSDL *screen) {
bool TTF_using(void); bool TTF_using(void);
if (!TTF_using() || ttf.inUse) if (!TTF_using() || ttf.inUse)
#endif #endif
GFX_ForceRedrawScreen(); {
GFX_ForceRedrawScreen();
#if defined(USE_TTF)
if (ttf.inUse) resetFontSize();
#endif
}
in_gui = false; in_gui = false;
} }

View File

@ -43,6 +43,7 @@
#include "keymap.h" #include "keymap.h"
#include "support.h" #include "support.h"
#include "mapper.h" #include "mapper.h"
#include "render.h"
#include "setup.h" #include "setup.h"
#include "menu.h" #include "menu.h"
@ -293,6 +294,11 @@ static void MAPPER_SaveBinds(void);
CEvent* get_mapper_event_by_name(const std::string &x); CEvent* get_mapper_event_by_name(const std::string &x);
bool MAPPER_DemoOnly(void); bool MAPPER_DemoOnly(void);
#if defined(USE_TTF)
bool TTF_using(void);
void resetFontSize(void);
#endif
Bitu GUI_JoystickCount(void); // external Bitu GUI_JoystickCount(void); // external
bool GFX_GetPreventFullscreen(void); // external bool GFX_GetPreventFullscreen(void); // external
void GFX_ForceRedrawScreen(void); // external void GFX_ForceRedrawScreen(void); // external
@ -5034,10 +5040,6 @@ void MAPPER_RunInternal() {
change_output(6); change_output(6);
} }
#endif #endif
#if defined(USE_TTF)
void resetFontSize();
if (ttf.inUse) resetFontSize();
#endif
#if defined (REDUCE_JOYSTICK_POLLING) #if defined (REDUCE_JOYSTICK_POLLING)
SDL_JoystickEventState(SDL_DISABLE); SDL_JoystickEventState(SDL_DISABLE);
#endif #endif
@ -5085,10 +5087,14 @@ void MAPPER_RunInternal() {
mainMenu.get_item("hostkey_mapper").check(hostkeyalt==0).set_text("Mapper-defined: "+mapper_keybind).refresh_item(mainMenu); mainMenu.get_item("hostkey_mapper").check(hostkeyalt==0).set_text("Mapper-defined: "+mapper_keybind).refresh_item(mainMenu);
#if defined(USE_TTF) #if defined(USE_TTF)
bool TTF_using(void);
if (!TTF_using() || ttf.inUse) if (!TTF_using() || ttf.inUse)
#endif #endif
GFX_ForceRedrawScreen(); {
GFX_ForceRedrawScreen();
#if defined(USE_TTF)
if (ttf.inUse) resetFontSize();
#endif
}
mapper.running = false; mapper.running = false;