From e1606f9bbc45e7ba57c461dc1ca4d4a86c5d76dd Mon Sep 17 00:00:00 2001 From: Aki Date: Sat, 9 Mar 2024 23:02:17 +0100 Subject: Replaced MachineInfo with stripped cross-platform solution It could easily handle more, but is there really need for it? Having some information about the machine in logs is nice, but with the current state of affairs most of errors are coming from bad pointer uses than anything else... InfoEx is STATIC, because it seems FoundationEx can cause multiple definitions in scenarios like this. --- Starshatter/CMakeLists.txt | 2 +- Starshatter/Main.cpp | 21 +++++++++------------ 2 files changed, 10 insertions(+), 13 deletions(-) (limited to 'Starshatter') diff --git a/Starshatter/CMakeLists.txt b/Starshatter/CMakeLists.txt index e73a639..892a10f 100644 --- a/Starshatter/CMakeLists.txt +++ b/Starshatter/CMakeLists.txt @@ -9,7 +9,7 @@ target_include_directories( ) target_link_libraries( Starshatter - PRIVATE StarsEx + PRIVATE StarsEx InfoEx ) add_version_file(Starshatter.rc Starshatter.rc.conf) target_sources( diff --git a/Starshatter/Main.cpp b/Starshatter/Main.cpp index f2417e9..beda5d0 100644 --- a/Starshatter/Main.cpp +++ b/Starshatter/Main.cpp @@ -6,6 +6,7 @@ AUTHOR: John DiCamillo */ +#include #include "Starshatter.h" #include "HUDView.h" @@ -21,7 +22,6 @@ #include "Color.h" #include "DataLoader.h" #include "Pcx.h" -#include "MachineInfo.h" #include "Encrypt.h" #include "FormatUtil.h" #include "Panic.h" @@ -29,23 +29,22 @@ #include "Random.h" #include "VersionInfo.h" -// +--------------------------------------------------------------------+ -// WinMain -// +--------------------------------------------------------------------+ -extern int VD3D_describe_things; -int dump_missions = 0; +extern int VD3D_describe_things; +int dump_missions = 0; -static void PrintLogHeader() + +static void +PrintLogHeader() { Text sTime = FormatTimeString(); - Print("+====================================================================+\n"); Print("| STARSHATTER %-25s%29s |\n", versionInfo, sTime.data()); - - MachineInfo::DescribeMachine(); + Print("+====================================================================+\n\n"); + Print("%s\n\n", InfoEx::LongDescription().data()); } + int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow) { @@ -125,5 +124,3 @@ int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, return result; } - - -- cgit v1.1