#pragma once
#include <utils/types.h>

char *CpyStr(const char* in);
void MaskIn(char *mod, u32 bitstream, char mask);
bool StrEndsWith(char *begin, char *end);
void WaitFor(u32 ms);
void RebootToPayloadOrRcm();
void reboot_to_hekate_menu(void);
bool hekate_reboot_available(void);
int launch_payload_ex(char *path, bool force_hekate_menu);
int launch_payload(char *path);

#define FREE(x) free(x); x = NULL;
char *ShowKeyboard(const char *toEdit, u8 alwaysRet);

void power_off();
void reboot_rcm();
void reboot_normal();