fix menu refresh

This commit is contained in:
Wengier
2021-05-21 01:20:07 -04:00
parent 0bd0fa0d82
commit 5002ba14d3
5 changed files with 22 additions and 12 deletions

View File

@@ -30,6 +30,7 @@
#include <string>
using namespace std;
extern bool dos_kernel_disabled, force_conversion;
bool CodePageHostToGuestUTF8(char *d/*CROSS_LEN*/,const char *s/*CROSS_LEN*/), CodePageGuestToHostUTF8(char *d/*CROSS_LEN*/,const char *s/*CROSS_LEN*/);
#define LINE_IN_MAXLEN 2048
@@ -71,7 +72,7 @@ void MSG_Replace(const char * _name, const char* _val) {
void InitCodePage() {
if (!dos.loaded_codepage) {
Section_prop *section = static_cast<Section_prop *>(control->GetSection("config"));
if (!dos.loaded_codepage && section!=NULL) {
if ((!dos.loaded_codepage || dos_kernel_disabled || force_conversion) && section!=NULL) {
char *countrystr = (char *)section->Get_string("country"), *r=strchr(countrystr, ',');
if (r!=NULL && *(r+1)) dos.loaded_codepage = atoi(trim(r+1));
}