mirror of
git://projects.qi-hardware.com/gmenu2x.git
synced 2025-04-21 12:27:27 +03:00
Use an enum instead of hardcoded values for the user-injected codes
This commit is contained in:
@@ -8,13 +8,14 @@
|
||||
#include <sys/inotify.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include "inputmanager.h"
|
||||
#include "monitor.h"
|
||||
|
||||
void Monitor::inject_event(bool is_add, const char *path)
|
||||
{
|
||||
SDL_UserEvent e = {
|
||||
.type = SDL_USEREVENT,
|
||||
.code = (int) is_add,
|
||||
.code = is_add ? OPEN_PACKAGE : REMOVE_LINKS,
|
||||
.data1 = strdup(path),
|
||||
.data2 = NULL,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user