feat(gui): exit recovery when exiting dfu panel

This commit is contained in:
CLARATION committed 2026-06-30 17:05:47 -07:00
1 parent 307f332ec8
commit ad33e49873
2 files changed
+4 -8

No files matched your search

+2 -7
View File
@@ -12,11 +12,6 @@
#include <libimobiledevice/lockdown.h>
#include <libirecovery.h>
#ifdef _WIN32
# include <windows.h>
# define sleep(x) Sleep(x*1000)
#endif
wxDEFINE_EVENT(EVT_DEVICE_STATE_UPDATE, wxCommandEvent);
void send_device_state(MainFrame* frame, const DeviceState& state)
@@ -71,7 +66,7 @@ MainFrame::MainFrame()
idevice_event_subscribe(normal_device_event_cb, this);
while (true)
sleep(1);
sleep_ms(1000);
}).detach();
std::thread([this]()
@@ -85,7 +80,7 @@ MainFrame::MainFrame()
);
while (true)
sleep(1);
sleep_ms(1000);
}).detach();
}
+2 -1
View File
@@ -60,8 +60,9 @@ DfuPanel::DfuPanel(MainFrame* frame, wxWindow* parent)
m_backButton = new wxButton(this, wxID_ANY, "Back");
m_startButton = new wxButton(this, wxID_ANY, "Start");
m_backButton->Bind(wxEVT_BUTTON, [frame](wxCommandEvent&)
m_backButton->Bind(wxEVT_BUTTON, [frame, this](wxCommandEvent&)
{
Reboot();
frame->ShowMain();
});