mirror of
https://github.com/Mr-Wiseguy/Zelda64Recomp.git
synced 2024-11-25 22:24:20 +01:00
Add fullscreen shortcut
This commit is contained in:
parent
8612c95b0a
commit
0a6b8d0da3
@ -5,6 +5,7 @@
|
|||||||
#include "recomp_input.h"
|
#include "recomp_input.h"
|
||||||
#include "recomp_ui.h"
|
#include "recomp_ui.h"
|
||||||
#include "SDL.h"
|
#include "SDL.h"
|
||||||
|
#include "rt64_layer.h"
|
||||||
|
|
||||||
|
|
||||||
static struct {
|
static struct {
|
||||||
@ -17,24 +18,15 @@ static struct {
|
|||||||
|
|
||||||
bool sdl_event_filter(void* userdata, SDL_Event* event) {
|
bool sdl_event_filter(void* userdata, SDL_Event* event) {
|
||||||
switch (event->type) {
|
switch (event->type) {
|
||||||
//case SDL_EventType::SDL_KEYUP:
|
case SDL_EventType::SDL_KEYDOWN:
|
||||||
//case SDL_EventType::SDL_KEYDOWN:
|
{
|
||||||
// {
|
SDL_KeyboardEvent* keyevent = (SDL_KeyboardEvent*)event;
|
||||||
// const Uint8* key_states = SDL_GetKeyboardState(nullptr);
|
|
||||||
// int new_button = 0;
|
|
||||||
|
|
||||||
// for (const auto& mapping : keyboard_button_map) {
|
if (keyevent->keysym.scancode == SDL_Scancode::SDL_SCANCODE_RETURN && (keyevent->keysym.mod & SDL_Keymod::KMOD_ALT)) {
|
||||||
// if (key_states[mapping.first]) {
|
ChangeWindow();
|
||||||
// new_button |= mapping.second;
|
}
|
||||||
// }
|
}
|
||||||
// }
|
break;
|
||||||
|
|
||||||
// button = new_button;
|
|
||||||
|
|
||||||
// stick_x = (100.0f / 100.0f) * (key_states[SDL_Scancode::SDL_SCANCODE_D] - key_states[SDL_Scancode::SDL_SCANCODE_A]);
|
|
||||||
// stick_y = (100.0f / 100.0f) * (key_states[SDL_Scancode::SDL_SCANCODE_W] - key_states[SDL_Scancode::SDL_SCANCODE_S]);
|
|
||||||
// }
|
|
||||||
// break;
|
|
||||||
case SDL_EventType::SDL_CONTROLLERDEVICEADDED:
|
case SDL_EventType::SDL_CONTROLLERDEVICEADDED:
|
||||||
{
|
{
|
||||||
SDL_ControllerDeviceEvent* controller_event = (SDL_ControllerDeviceEvent*)event;
|
SDL_ControllerDeviceEvent* controller_event = (SDL_ControllerDeviceEvent*)event;
|
||||||
|
Loading…
Reference in New Issue
Block a user