mirror of
https://github.com/palera1n/palera1n.git
synced 2026-10-23 18:49:48 +02:00
feat(gui): exit recovery when exiting dfu panel
This commit is contained in:
2 files changed
+4
-8
No files matched your search
+2
-7
@@ -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
@@ -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();
|
||||
});
|
||||
|
||||
|
||||
Reference in new issue
Block a user