Skip to content

Commit

Permalink
Run gimx.exe with elevated privileges to improve timer accuracy #480
Browse files Browse the repository at this point in the history
  • Loading branch information
matlo committed Oct 4, 2019
1 parent 2f429bb commit 3da308c
Showing 1 changed file with 10 additions and 20 deletions.
30 changes: 10 additions & 20 deletions launcher/gimx-launcher.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1174,8 +1174,6 @@ launcherFrame::launcherFrame(wxWindow* parent,wxWindowID id __attribute__((unuse
#ifndef WIN32
Output->Append(_("Bluetooth / PS3"));
Output->Append(_("Bluetooth / PS4"));
#else
Input->Append(_("Physical devices (elevated privileges)"));
#endif

Output->Append(_("Stub"));
Expand Down Expand Up @@ -1442,12 +1440,8 @@ void launcherFrame::OnButtonStartClick(wxCommandEvent& event __attribute__((unus
}

#ifndef WIN32
command.Append(wxT("xterm -e "));
command.Append(wxT("xterm -e gimx"));
#endif
if(Input->GetStringSelection() != _("Physical devices (elevated privileges)"))
{
command.Append(wxT("gimx"));
}

if(Output->GetStringSelection() == _("Stub"))
{
Expand Down Expand Up @@ -1575,22 +1569,18 @@ void launcherFrame::OnButtonStartClick(wxCommandEvent& event __attribute__((unus

startTime = wxGetUTCTime();

if(Input->GetStringSelection() != _("Physical devices (elevated privileges)"))
{
MyProcess *process = new MyProcess(this, command);

if(!wxExecute(command, wxEXEC_ASYNC | wxEXEC_NOHIDE, process))
{
wxMessageBox( _("can't start gimx!"), _("Error"), wxICON_ERROR);
}
}
#ifdef WIN32
else
{
runAs(wxT("gimx.exe"), command);
#ifndef WIN32
MyProcess *process = new MyProcess(this, command);

OnProcessTerminated(NULL, 0);
if(!wxExecute(command, wxEXEC_ASYNC | wxEXEC_NOHIDE, process))
{
wxMessageBox( _("can't start gimx!"), _("Error"), wxICON_ERROR);
}
#else
runAs(wxT("gimx.exe"), command);

OnProcessTerminated(NULL, 0);
#endif
}

Expand Down

0 comments on commit 3da308c

Please sign in to comment.