FIX: GUI: use another api to get process type

jira: no-jira
Change-Id: I43fb1738b9b0173704c17c0d92df06f3c78fcde6
This commit is contained in:
lane.wei 2025-04-11 11:07:43 +08:00
parent 4a981b37b2
commit af8926ea39
2 changed files with 17 additions and 12 deletions

View File

@ -326,7 +326,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) 2021-2024 Lunkuo All Rights Reserved", wxDefaultPosition, wxDefaultSize); wxStaticText *html_text = new wxStaticText(this, wxID_ANY, "Copyright(C) 2021-2025 Lunkuo 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

@ -2682,18 +2682,23 @@ bool GUI_App::on_init_inner()
BOOST_LOG_TRIVIAL(info) << boost::format("gui mode, Current BambuStudio Version %1%")%SLIC3R_VERSION; BOOST_LOG_TRIVIAL(info) << boost::format("gui mode, Current BambuStudio Version %1%")%SLIC3R_VERSION;
BOOST_LOG_TRIVIAL(info) << get_system_info(); BOOST_LOG_TRIVIAL(info) << get_system_info();
#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);