mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-18 11:02:08 +00:00
Update the codes to 01.01.00.10 for the formal release
1. first formal version of macos 2. add the bambu networking plugin install logic 3. auto compute the wipe volume when filament change 4. add the logic of wiping into support 5. refine the GUI layout and icons, improve the gui apperance in lots of small places 6. serveral improve to support 7. support AMS auto-mapping 8. disable lots of unstable features: such as params table, media file download, HMS 9. fix serveral kinds of bugs 10. update the document of building 11. ...
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
#include "wxMediaCtrl2.h"
|
||||
#include "I18N.hpp"
|
||||
|
||||
wxMediaCtrl2::wxMediaCtrl2(wxWindow *parent)
|
||||
: wxMediaCtrl(parent, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxMEDIACTRLPLAYERCONTROLS_NONE)
|
||||
@@ -8,6 +9,26 @@ wxMediaCtrl2::wxMediaCtrl2(wxWindow *parent)
|
||||
void wxMediaCtrl2::Load(wxURI url)
|
||||
{
|
||||
#ifdef __WIN32__
|
||||
if (m_imp == nullptr) {
|
||||
auto res = wxMessageBox(_L("Windows Media Player is required for this task! Shall I take you to the guide page of 'Get Windows Media Player'?"), _L("Error"), wxOK | wxCANCEL);
|
||||
if (res == wxOK) {
|
||||
wxString url = "https://support.microsoft.com/en-au/windows/get-windows-media-player-81718e0d-cfce-25b1-aee3-94596b658287";
|
||||
wxExecute("cmd /c start " + url, wxEXEC_HIDE_CONSOLE);
|
||||
}
|
||||
m_error = 2;
|
||||
wxMediaEvent event(wxEVT_MEDIA_STATECHANGED);
|
||||
event.SetId(GetId());
|
||||
event.SetEventObject(this);
|
||||
wxPostEvent(this, event);
|
||||
return;
|
||||
}
|
||||
|
||||
auto hModExe = LoadLibrary(NULL);
|
||||
auto NvOptimusEnablement = (DWORD *) GetProcAddress(hModExe, "NvOptimusEnablement");
|
||||
auto AmdPowerXpressRequestHighPerformance = (int *) GetProcAddress(hModExe, "AmdPowerXpressRequestHighPerformance");
|
||||
if (NvOptimusEnablement) *NvOptimusEnablement = 0;
|
||||
if (AmdPowerXpressRequestHighPerformance) *AmdPowerXpressRequestHighPerformance = 0;
|
||||
|
||||
url = wxURI(url.BuildURI().append("&hwnd=").append(
|
||||
boost::lexical_cast<std::string>(GetHandle())));
|
||||
#endif
|
||||
@@ -21,7 +42,7 @@ void wxMediaCtrl2::Stop() { wxMediaCtrl::Stop(); }
|
||||
|
||||
wxSize wxMediaCtrl2::GetVideoSize() const
|
||||
{
|
||||
return m_imp->GetVideoSize();
|
||||
return m_imp ? m_imp->GetVideoSize() : wxSize(0, 0);
|
||||
}
|
||||
|
||||
wxSize wxMediaCtrl2::DoGetBestSize() const
|
||||
|
||||
Reference in New Issue
Block a user