Ȩ̴̛̛̛̝͉̬͙͕̯̬̙̥̬̺̫̭͉̱͈̭͕͍͈̲̯̀̔͒̑̈͛̂̃̑̓̄̊͌͆̎̉͐́̀̇͒̋̒́͊̈́͊̓̈̓̍̑͛̑̃͒̌͗̐̈́̈̈̒̏̀́͌̿̂͂̽́̂̉̅̽̀͌́̔̔̾̃͆̓͗͊͌̃͘̚̚̕̚̕͝͠͝͝ê̴̢̨̧̢̧̛̛͖̲̠̞͓̪͕͙̖̟̯͕̭̘͖̤͕̲̬͔͎̞͇̩̦̳̲̺͎͍̱̯͔̼͙̯͙̮͔̼͎̫͇̯͚̳̭̇̂̃̃̓̅͐́̆̀͑̅͌̓͑̏̄̆͊̅̀̒́̌̄̌̈́͆̋̔͐͊̓͒̈́̋̉͆̑͑̿̈͑̓̾͗̿̈̏͘̕͝͠͠ͅͅḩ̵̛̘̣͖̤̪͉̦͓͖̈́̎́̌̂̈͌̍̍͋͒̊͊́̑̓̓͘͘͘̚͜͝͝͝†̷̧̨̨̨̩̩̺͔̖̼̺͙̰̞͚̻̙̙̜͙̯̪͉̻͈̲͎͔͉̟̻̱̦̝̱̝͍̩̣̞͍̘̥̪̺̺̜̯̹̬̮̱͚̥̦̲̙̪̮̠̩̞̫̞͙̰̪̤͖̙̖̼̖͇͚̆̋̋̀̃͒̑̌͛̍̿̄̏͜͠ ̵̢̛̲͈̩̭͙͙̺̠͇̲̣̗̗͕͍͚̼̯̣̮̌̾̉̓͐̄͐̓̇̂̔͂̔̒̈́͌̏̓̔̾͆̈́͌̑̄͋̃̎͑͛̈́̃̋͑͑̍̍̀̂͆͛͂̇͒͂̃͐͊̈́̍̆͆̐͊̈́̓͑́̐̾͐̈́̒̔̓̾̈́̄̔̚͘̚̕̚͘͝͠͠ͅñ̸̨̢̡̳̙͔̗͕̙̩̝̖̹̪̺̟̼̝͓̬̻͓̮̣̜̖̤̯͖͕̗̝͖̩̬͎̳͚͙̤͙̞̺͉͇̱̩̪̞̭͙̱̫̯͚͓͌̋̄̃̔́̐̀̐̍̈́̽̑͋̋̉̽̌̅̈̅̓̇̓̈̚͘͘͜͝͝͝ð̷̡̧͈̭̤̙̦͇̺̝͖͖͈̤̦̤̗̐̅̓̓̓͐͒̐͗̓̃̈̿̾̒̈̈́̂̇̂̅̽̈̈́͊́͛̅̾̔̀̎̈̽̒̓̎̎̂̀̏̽̃̌̎̎̏́̒̓͗͐̾̍͒̓̏̽̚̕̕̕̕͝þ̴̨̢͕̙̯͈͉͈̳͔̪̥̲̯̥̞̜̪̬̺͖͈͉̼̟̠̥͈̮̻̼̤̤͎̘̪̻̗͐̉͌́̎͑̊́̇̈́͑͐͆̋̆̾͂̈̉̑̈̊́̾̈́̈͂̀͛͂̂͊̓̂̆̉̀͌̒͊͊́͆͛̿͑͌͗̏̽̎̋̚̚̚͘̕͜͜͝͝͠͝͝͝͝͝ͅµ̴̡̨̛̤̭͇̫̹̳͇̞̼̳̣̙̘̫͇͖͈͕̮̀̉̒̎̈̀̓͒̽͊̎͋̆́͂͒̎̉̎̒̑͆͌̒̂̎̂͋̇͌̄͛̑̏́͂̾̎͂̅͋͗̄́̿͌̔͌͘͘ ̶̧̧̧̮̩̜̝͈͙͖̼̦͕̥̻̬̣̜̣̣͉͙͕͔͓̟͚̩͎͍̣̟͔͚͚̼̦̥̯̠͎̩͎̣͈̦̯̰͎̦̜͚̀̇̄̎̀͑́͆̽̓̋̀̎̾̃̅̏͌͑̇̏͗̅́̽̈́͐̑͊͂̃́͐̈͐̀̍̽̔͗̊̓̓̾̉̄͗̈́̓͗̇̈́͛͗͒͑̏̈́̿͗̂̀͒̾̽́̀͒̓̔́̕̕̕͘͘͘͝͠͠͝͝͠͠͝ͅͅͅͅL̵̢̡̧̧̢̨̨̨̛͉̺̖͍̻͉̟̯͔͚͎͚̝̻̞̠͓̻̰͉̲̺̦̤͍̫͙̲̺̣̬̜͖̮̬̪̣͙̩̮̭̪͖͖̱̺͚͍̳̙͚̣̬̥̫̳͔̬͇͙̣̍̓̆͊͐̂̀̔̾͌̔͐͂̃̍̍̊̈̈̐̌̈́̔͂̎͊̅̏̍̽̚̚͜͝͝͝͝ͅͅl̴̢̧̢̩͍̩̫̙̤̦͇̟̪̩̙̠̮͖̩͇̘̼̫̼̲̣̟̩̘̟̳͇̜̠͔̗͈̯͙̞͓͛́̍͂́͑͛̇͂͌͆̇͂̾̐͑̒̌́̒̑̒̈́̃̉́͑̈́͋̓̒͒̽̉̔̆̈́͑͆̍͒̂͆͊̚̚͘͘͝å̶̡̢̢̢̡̨̨̡̢̛̮̰͚͕̹̘̼͈͖̠̲̗̰̥͈̪̲̱͕̦̘͎̖͇̗̜͇̬̤̞̱̯̟͎̲̦̩̜̳̮̟͈͇̫͎̯̗͙͔̼̒̊̐͊̍̂̈͑̑̎͊̒͑̊͋̽̂̉͜͜͝ͅͅͅ¢̶̡̧̧̛̜̲͕͇̮͙̹͎̘̦̖̺͕̪͔͈͉̝͓̖͖̫͖̥̌͛̅̀͆̎́̈́͒̃͑̋͘̕ͅ ̴̨̨̛̛̛̛̛̛̰͈͔̪̥̲̲̮͖̗̺͕͚͚̦̞͕̩̙̲̫̘͚̙͚̖̳̙͈̮͉̬̹̯̞̥͉̼̦̣̠̠̹͚̗̫̝̤̩͓̪̜͒̆͗̀̐̊̔̿̈͆̍͌̾̀̓̅͑͑̄́͂̓̋͆̇͆͆͑̎̑̆̽́̒͊͂̄͊̅͗̅͌͋͑͑̎̈́́̈́̆̿̏̈́̍̊̍́̄͋̀̉̿͛̏̌̉̊͌̒̌̑̌̚͘̚̕͜͜͠͝͠Ì̷̡̧̧̛̻̟̻̤̗̙̻̻̠̖̰̞͍̤̥̙̳̮͉̱͉̳͚̉͒̎̎͌̓̈́̐̓̅̍̈́̍̂̀͒̾͑̈̚͜͠,̴̡̢̨̡̨̡̧̧̛̰͉̫͎̼͍̬̠̬̳̠̫̳̼̻̜̞̪͔̖͓͇͉͖̥̩͚̫͇̱̤́̃͆̄̒͆̒͌̉̄̓̂̂̎̂̌̇̓̈́͌́̃̌̓̈́̋͐́̀͂̓̒̀̄͗̒͂̾̂̈́̍̌̎͂͌̏̊͘͘̕̕͠͝͝͠͠͝ ̷̡̨̛͍̗̙̹̻̳͖͉̟͇͖̙̖̹̙̰̩̘̗͉̗͇͙͔̝̗̯̫̭̬̰̩͉̥͖̪̤̮̟̖̯͖͔̫̦̰̞͍̹̠͔͇̠̣͉͙̖̙̪͔̪͎̍͐̌̀̎͑́̉̈́̐͗̋̅̄͗̈́̉͆̿̓̈́̑̓͐̋̈̇̽̑̈́̓͐͛͐̓̏͒̈́͋͂̎́͐̈́͌̏̓̎̉̾̚̚͘͝͝ͅͅͅÌ̵̢̧̧̨̢̛̛̛̼̙̩̖͓̫̥͎̳͖̟͍̙̦̟͔̲̯̱̮̣̻͙̪̹̭̞̻̠̠̟͔̭̘͔̝̯̮̳̺̗̪͇͇̳̼̦͎̺̩͈̑́͋̌̋̄͌̇̍̓͂̋̆̎̔͌̀͋͆̏̈́́̍̇̈́̿͐͊̅̇̒͐̾̽̌̇́̅̑̒̄͌̿́̈̏͌̂͌̽̿̌̽͛̏͗̋̾̍̈̈́̽͐̏̒̇̈́̂̃̚͘̕̚̚͜͠͝͝͠͝͝͠þ̸̧̧̨̢̨̛̱̲̜͍̤̺̭̮̫̯̼͕͈͍̮͎̥̫̖̙͙͍̞̱̳̜͕̙̯͈̯̣̬̹̰̘̤̣̫̯̙̲͔̝̲͇͙̖̗̬̪̭̱̯̙͈̰͓̱̲̯̈̑̿͌͜͜ͅͅÇ̸̧̢̨̡̨̨̡̛̛̛̛̛̛̲̜͎̙̖̞̪̝͉̹̣̙͙̠̣͈̭̥̺̰͇̤̰̹͔͍̹̥̱̬̫̠̙͖̱̙̞̮̘̟͇̥̹̺̺̝͇̲̣͖̭̭̥͋́̃̓̉̈́̒̂̏̀̉́̾́͆͛̐̂̏́́̇͂̀̏̇̆̓̓͑͐͊̾̾͌̂͑̀͛̏͐̂͒̏̎͆̋͒͛̐͊̃͋̇̈́̓̈́̈̆̚̚̕͜͜͜͜͠͠͝͝͝M̶̡̢̧̨̡̢̛̲̥̯͉̗̥̙̲̬̫͚̼̜̝̲̲͓̖̬͔̖̦͕̫̗͈̼̹̥̣̙͚̮̣̘̟͕̰͍̬̘̮̱̲̘̜̫͚̹̤̘̥̲̮̦̱̲͍͔̝̤̣̣͕̯͕͍̞̘̰̲̮͗̎̓̀́̀̾͐́͋̍̐̽̂͌͑̅̒̏̾̇̋̓̋̈́̈́̐̅͌̈́̀̿̏̈́̒͊̃̽̐̎̆̽̄̄́̊͗̉͋̅͗͒̔̀̐́̈́͌͗̑̀̑̋̍́͂̓̏̈́̐̓̚̕͘͜͝͠͝͝͝͝ͅͅ ̸̧̢̛̛̗̣̺̩̤̬͓͈̦̙̠͉͕̲͚͕͉̩̺̬̣̳͇͍̞͈̬̉̏̔͊̔͂̋̌͒̔̎̊͂͆̓͆̄͌̓̊̈́̐̀̋̅͗͋͊͌͑̿͋̊̈͒̅́͌͒͒́̋̈́̂͌͂̇͒̈̽̔͛̉̔̀͘̚̚͝͠†̷̨̨̡̡̡̨̢̡̥͖̫͕̭͕̣̜̹̺͍̤̞̩̤̮̙̟̞̝̱͇͖͕̗̪̺̝̳͈̘̬̰͉̳̭̼̗̝̞͚̫͕̺̬̪͎̤͉̣̱̩̜́̂͂̽͑̀̀̃̇̽͑̾̈́͑͐̂͝͝͝ͅͅḁ̶̢̡̢̨̧̭̳̺̼̪͔̻̯̗͎̠̪̥̟̙͔̬̳̤͎̪͍̥̳͈̤̱̩̦͇͈̳̻͉̻̥̺͉͓̣̟̝̺̱̣̰̙̱̹̞̱̣̘͍̜̩̥̳̥̭̻̠̥̬͚̤̫̩̮̯̜͍̊̌̀͊́͂̓̒̀̈́̎͑̌́͆̒̇̽̂̿̋̓͊͂̑̌͂͛̿̊͌̈́̈̅̎͋͂͐͑̏̊̑̉͒̎͑̃̎̾̌̈̀̅͐̿̎̒̄̐̌̃̿̈́̎̉̿͋̑̌̂̑́̌̂̇͛̾̕̕̚̚͜͠͝͝͝ȩ̸̢̛̲͖̳̦̖̝͈͉̬̟͚̲͍͚̬̲̥̳͙̰͖̺̙̥̜͈̹̪͚̗̰̹͍̘͓͙̞̬̤̫̞͉̤̲͔̘̭̻̯͍̂͑͊̇̾̀͐̐́̅̒̋̃̑̅͋̀̌͒̆̇́̾̾͂̀̒́̍̒̄̏̓͗̄͑̓̏́̇͒͑͊͑̾̐͗̉͆̅̓̔͗̾̍̏͆͂̾̅͊̽̆̄͌̕̚̚͜͝͝͠͝͠͠͝ͅͅͅͅr̴̢̡̨̡̡̢̧̡̢̨̛̛̛̗͙͖̱̖̣̣̰̻̘̮̻͉̳̙͈̳͚͓̟̦͚͕͓͈̬̥͚̪̰̘̗̮͖̯̬̯̲̠͎͍͔̯̩̱͕̲̺̖̥͈̼͍̤̗͕̻̗̘̙̥̦̼͔̘̰̹̱̰̫̜͇͎͚̞̥̝̉͂̈͐̃̒̔̑̈́̉̒̃̄̀̈́̃̔͆̄̓͋͐̓̍̊̉̍̈́́̒̓̍͛͌̾̎͘͜͜͝͝͝ͅͅģ̶̧̡̧̧̨̧̡̡̨̛̛̹̻̥̱͕̥͙̮̣̻̖̭̪͚͍͖̬̲̠̞̭͈̼̙̼̼̺͍͚̟̭̫̯̦̬̭̤̙̺̪̹̣̦̘̭̠̞͕̳̻͙̟̼͉̘̞̥̭̪̺͔̼̠͖̫̥̬̦̳͈̱̱̳̀͊̅͛̎̆̓̑͒̉̀́̎̔̇̈̂̓̓̏̈̔̇͛̏̑̊͐̈́̀͊̎̏̆̿͗̂̓̊͂͒̌̄̄̔̈̔̏̔͊͊̏̂̅̄͒̀̇̚̚͜͝͝͝͝͝ ̷̢̧̡̢̢̧̺̗̙͉̠̺̤̝̲͔̠̹̬̬͎̪̖̜̘̪̪͚̹̜̥̖̻̙̩̝͕̥͚̜̣̞̫͎͚̪̰̣̭̻̠̲̮͙͙͈̜̣̲̫̺͖̤͉͙̤̻̲͖̙͗͜͜͜͜H̵̨̧̡̡̨̧̛̛̛̛̛̫͈͔̲̭̠̮̪͕̳̼̞̞͈̪̲̺̤̗͓͙̠̬̪͈̩͇͈͎̤̼̳̣̰͉̯̻̋͂̌͂̋͒̂̎̂̑͂̑͐̌̈́̌͑́͐̀̆̏̎̀͌͗̅̉̇̾̆̋̂͒̋̈́̾̓̏͌̈̏͐̈́̇̓̅́̓́͗͋̀̓͑̿̑̅̀̎͊͋̌̀͆͛̕͘̚̕̚͜͝͠͝͝͝ð̶̨̧̨̧̛͇̟͔̮͉̹̻̘͔̞͇̬̹͚̞̗͓̘̠̺̹͚̝̳̗͚͚̝͈̣̠͖̦͙̰̹͍̬̘͙͚͙̺̘̩̙̰̖͇̤̺̎́͛̍̓̊̒̈́̈́̋̈́̋̋̓̾͋̈́͐̈̓͋͋̄̑̒͛̑̄̉̅͋̽̓̋͑̉́̋͑͗̽̂͊͆̊̉̀͑̍̊̑̏̒̄́̆̊̆͒͌̒̾̌̓̐͛̄́̆̇̿̅̃͗̈̄̈́̄̓̎͐͘̚͘̚͘͘͘̕͠͝͝͠͝ͅͅ!̸̢͇̺̲͙̣͚̮͙̝͖͚̒̽̌͂̓́̌̒̓̋̓͐͑̐͋̐̀̔̊̍̂̎̍̆̓̅̒͋̆̇͂̑̀̔͊̏̕͘͝

This commit is contained in:
TheBrokenRail 2023-11-13 17:45:05 -05:00
parent 80c0f24a5d
commit b0aac13057

View File

@ -11,6 +11,14 @@
#include <SDL/SDL.h> #include <SDL/SDL.h>
#ifndef MCPI_HEADLESS_MODE #ifndef MCPI_HEADLESS_MODE
#include <media-layer/core.h>
#include <mods/input/input.h>
#include <mods/sign/sign.h>
#include <mods/chat/chat.h>
#include <mods/home/home.h>
#endif
// Custom Title // Custom Title
HOOK(SDL_WM_SetCaption, void, (__attribute__((unused)) const char *title, const char *icon)) { HOOK(SDL_WM_SetCaption, void, (__attribute__((unused)) const char *title, const char *icon)) {
ensure_SDL_WM_SetCaption(); ensure_SDL_WM_SetCaption();
@ -23,15 +31,6 @@ HOOK(SDL_ShowCursor, int, (int toggle)) {
ensure_SDL_ShowCursor(); ensure_SDL_ShowCursor();
return (*real_SDL_ShowCursor)(toggle == SDL_QUERY ? SDL_QUERY : SDL_DISABLE); return (*real_SDL_ShowCursor)(toggle == SDL_QUERY ? SDL_QUERY : SDL_DISABLE);
} }
#endif
#ifndef MCPI_HEADLESS_MODE
#include <media-layer/core.h>
#include <mods/input/input.h>
#include <mods/sign/sign.h>
#include <mods/chat/chat.h>
#include <mods/home/home.h>
// Intercept SDL Events // Intercept SDL Events
HOOK(SDL_PollEvent, int, (SDL_Event *event)) { HOOK(SDL_PollEvent, int, (SDL_Event *event)) {
@ -54,6 +53,7 @@ HOOK(SDL_PollEvent, int, (SDL_Event *event)) {
if (ret == 1 && event != NULL) { if (ret == 1 && event != NULL) {
int handled = 0; int handled = 0;
#ifndef MCPI_HEADLESS_MODE
switch (event->type) { switch (event->type) {
case SDL_KEYDOWN: { case SDL_KEYDOWN: {
// Handle Key Presses // Handle Key Presses
@ -110,6 +110,7 @@ HOOK(SDL_PollEvent, int, (SDL_Event *event)) {
break; break;
} }
} }
#endif
if (handled) { if (handled) {
// Event Was Handled // Event Was Handled
@ -119,7 +120,6 @@ HOOK(SDL_PollEvent, int, (SDL_Event *event)) {
return ret; return ret;
} }
#endif
// Exit Handler // Exit Handler
static void exit_handler(__attribute__((unused)) int data) { static void exit_handler(__attribute__((unused)) int data) {