Skip to content

Commit

Permalink
Prevent quitting when suspending the system
Browse files Browse the repository at this point in the history
  • Loading branch information
dokutan committed Apr 1, 2020
1 parent 2e4eae5 commit 2006df8
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions macrodevice-lua.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -207,9 +207,12 @@ template< class T > int run_macros( T device, lua_State *L, bool drop_privs, int
event.clear();
if( device.wait_for_event( event ) != 0 )
{
std::cerr << "Error: could not get input event\n";
device.close_device();
return 1;
std::cerr << "Warning : could not get input event\n";
continue;

// When suspending, the current read fails, however the program should not quit
/*device.close_device();
return 1;*/
}


Expand Down

0 comments on commit 2006df8

Please sign in to comment.