Commit 76f4ec09 authored by bbbradsmith's avatar bbbradsmith
Browse files

option to disable keyboard input as well (in case you don't need it and don't...

option to disable keyboard input as well (in case you don't need it and don't want conflicts with retroarch hotkeys)
parent b00dd664
......@@ -14,6 +14,7 @@ extern const char *retro_content_directory;
char RETRO_DIR[512];
char RETRO_TOS[512];
extern bool hatari_nomouse;
extern bool hatari_nokeys;
//HATARI PROTOTYPES
#include "configuration.h"
......@@ -380,7 +381,7 @@ void Process_key(void)
int i;
for(i=0;i<320;i++)
{
Key_Sate[i]=input_state_cb(0, RETRO_DEVICE_KEYBOARD, 0,i) ? 0x80: 0;
Key_Sate[i]= (input_state_cb(0, RETRO_DEVICE_KEYBOARD, 0,i) && !hatari_nokeys) ? 0x80: 0;
if (i == RETROK_SPACE) // can map R3 to space bar
{
......
......@@ -63,6 +63,7 @@ float FRAMERATE = 50.0, SAMPLERATE = 44100.0;
extern bool UseNonPolarizedLowPassFilter;
bool hatari_twojoy = true;
bool hatari_nomouse = false;
bool hatari_nokeys = false;
bool hatari_fastfdc = true;
bool hatari_borders = true;
char hatari_frameskips[2];
......@@ -120,7 +121,18 @@ void retro_set_environment(retro_environment_t cb)
{
"hatari_nomouse",
"Disable mouse",
"Disables input from your sytem mouse device. Gamepad mouse mode (select) is not disabled.",
"Prevents input from your sytem mouse device. Gamepad mouse mode (select) is not disabled.",
{
{ "false", "disabled" },
{ "true", "enabled" },
{ NULL, NULL },
},
"false"
},
{
"hatari_nokeys",
"Disable keyboard",
"Prevents input from your sytem keyboard. Virtual keyboard is not disabled.",
{
{ "false", "disabled" },
{ "true", "enabled" },
......@@ -257,6 +269,15 @@ static void update_variables(void)
// to prevent conflicts if needed, because Hatari seems to automatically merge/combine mouse and joystick in a weird way.
}
var.key = "hatari_nokeys";
var.value = NULL;
if (environ_cb(RETRO_ENVIRONMENT_GET_VARIABLE, &var) && var.value)
{
hatari_nokeys = false;
if(strcmp(var.value, "true") == 0)
hatari_nokeys = true;
}
// Floppy
var.key = "hatari_fastfdc";
var.value = NULL;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment