port: UserInterface.cpp entry unit — ApplicationSetErrorString/StringTable_Initialize verbatim, Main ADAPTED to PythonBoot, Win32 entry N_A

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
shenlei
2026-09-30 15:08:00 +09:00
co-authored by Claude Opus 5.5
parent fd4d9a39df
commit b497fce393
7 changed files with 96 additions and 18 deletions
+8
View File
@@ -18,6 +18,7 @@
#include "ScriptLib/StdAfx.h"
#include "../../src/platform/ScriptLib/PythonBoot.h"
#include "../../src/platform/ScriptLib/PythonHost.h"
#include "UserInterface/StdAfx.h" // ApplicationSetErrorString, ApplicationStringTable_GetStringz
#include "../../src/platform/UserInterface/UserInterface.h"
#include "../../src/platform/EterLib/UIRenderCommands.h"
#include "../../src/platform/EterLib/RenderCommands3D.h"
@@ -327,6 +328,13 @@ int main(int argc, char** argv)
GraphicBaseAccess::DetectorString(&modes);
CHECK(modes.find("800x600x32 HWVP") != std::string::npos);
}
// 40250 UserInterface.cpp: CheckLatestFiles hands WinMain its message through ApplicationSetErrorString;
// the string table keeps the (DWORD) text per id.
CHECK(gs_szErrorString[0] == '\0');
ApplicationSetErrorString("File 'a' is not latest version.");
CHECK(std::string(gs_szErrorString) == "File 'a' is not latest version.");
gs_szErrorString[0] = '\0';
CHECK(std::string(ApplicationStringTable_GetStringz(1)) == "Metin 2");
{
CScreen screen;
CHECK(!screen.IsLostDevice() && screen.RestoreDevice());