FIX: GUI: use another api to get process type

jira: no-jira
Change-Id: I43fb1738b9b0173704c17c0d92df06f3c78fcde6
(cherry picked from commit af8926ea396480ea06222d421a2ecb704df04218)
This commit is contained in:
lane.wei
2025-04-11 11:07:43 +08:00
committed by Noisyfox
parent ebc072b141
commit 285bbeceb7
2 changed files with 17 additions and 12 deletions

View File

@@ -328,7 +328,7 @@ AboutDialog::AboutDialog()
copyright_hor_sizer->Add(copyright_ver_sizer, 0, wxLEFT, FromDIP(20)); copyright_hor_sizer->Add(copyright_ver_sizer, 0, wxLEFT, FromDIP(20));
wxStaticText *html_text = new wxStaticText(this, wxID_ANY, "Copyright(C) 2022-2024 Li Jiang All Rights Reserved", wxDefaultPosition, wxDefaultSize); wxStaticText *html_text = new wxStaticText(this, wxID_ANY, "Copyright(C) 2022-2025 Li Jiang All Rights Reserved", wxDefaultPosition, wxDefaultSize);
html_text->SetForegroundColour(wxColour(107, 107, 107)); html_text->SetForegroundColour(wxColour(107, 107, 107));
copyright_ver_sizer->Add(html_text, 0, wxALL , 0); copyright_ver_sizer->Add(html_text, 0, wxALL , 0);

View File

@@ -2287,18 +2287,23 @@ bool GUI_App::on_init_inner()
BOOST_LOG_TRIVIAL(info) << boost::format("gui mode, Current OrcaSlicer Version %1%")%SoftFever_VERSION; BOOST_LOG_TRIVIAL(info) << boost::format("gui mode, Current OrcaSlicer Version %1%")%SoftFever_VERSION;
#if defined(__WINDOWS__) #if defined(__WINDOWS__)
SYSTEM_INFO sysInfo; USHORT processMachine = 0;
GetNativeSystemInfo(&sysInfo); USHORT nativeMachine = 0;
switch (sysInfo.wProcessorArchitecture) { if (IsWow64Process2(GetCurrentProcess(), &processMachine, &nativeMachine)) {
case PROCESSOR_ARCHITECTURE_ARM64: switch (nativeMachine) {
m_is_arm64 = true; case IMAGE_FILE_MACHINE_ARM64:
break; m_is_arm64 = true;
case PROCESSOR_ARCHITECTURE_AMD64: break;
default: case IMAGE_FILE_MACHINE_AMD64:
m_is_arm64 = false; default:
break; m_is_arm64 = false;
break;
}
BOOST_LOG_TRIVIAL(info) << boost::format("processMachine architecture %1%, nativeMachine %2% m_is_arm64 %3%")%(int)(processMachine) %(int) nativeMachine %m_is_arm64;
}
else {
BOOST_LOG_TRIVIAL(info) << boost::format("IsWow64Process2 failed, m_is_arm64 %1%") %m_is_arm64;
} }
BOOST_LOG_TRIVIAL(info) << boost::format("process architecture %1%, m_is_arm64 %2%")%(int)(sysInfo.wProcessorArchitecture) %m_is_arm64;
#endif #endif
// Enable this to get the default Win32 COMCTRL32 behavior of static boxes. // Enable this to get the default Win32 COMCTRL32 behavior of static boxes.
// wxSystemOptions::SetOption("msw.staticbox.optimized-paint", 0); // wxSystemOptions::SetOption("msw.staticbox.optimized-paint", 0);