mirror of
https://github.com/mist-devel/mist-firmware.git
synced 2026-01-13 15:17:43 +00:00
Disable OSD on/off action if OSD button has been used for scandoubler toggle.
This commit is contained in:
parent
d169f95166
commit
06052723e8
21
osd.c
21
osd.c
@ -580,6 +580,8 @@ void ConfigAutofire(unsigned char autofire)
|
||||
spi_osd_cmd8(OSD_CMD_JOY, autofire & 0x07);
|
||||
}
|
||||
|
||||
static unsigned char disable_menu = 0;
|
||||
|
||||
// get key status
|
||||
unsigned char OsdGetCtrl(void)
|
||||
{
|
||||
@ -644,15 +646,26 @@ unsigned char OsdGetCtrl(void)
|
||||
// currently no key pressed
|
||||
if(!c) {
|
||||
static unsigned char last_but = 0;
|
||||
unsigned char but = CheckButton();
|
||||
if(but && !last_but) c = KEY_MENU;
|
||||
if(!but && last_but) c = KEY_MENU | KEY_UPSTROKE;
|
||||
last_but = but;
|
||||
if(!disable_menu)
|
||||
{
|
||||
unsigned char but = CheckButton();
|
||||
if(!but && last_but) c = KEY_MENU;
|
||||
last_but = but;
|
||||
}
|
||||
else
|
||||
{
|
||||
last_but = 0;
|
||||
}
|
||||
}
|
||||
|
||||
return(c);
|
||||
}
|
||||
|
||||
void OsdDisableMenuButton(unsigned char disable)
|
||||
{
|
||||
disable_menu = disable;
|
||||
}
|
||||
|
||||
unsigned char GetASCIIKey(unsigned char keycode)
|
||||
{
|
||||
if (keycode & KEY_UPSTROKE)
|
||||
|
||||
1
osd.h
1
osd.h
@ -121,6 +121,7 @@ void ConfigFloppy(unsigned char drives, unsigned char speed);
|
||||
void ConfigIDE(unsigned char gayle, unsigned char master, unsigned char slave);
|
||||
void ConfigAutofire(unsigned char autofire);
|
||||
unsigned char OsdGetCtrl(void);
|
||||
void OsdDisableMenuButton(unsigned char disable);
|
||||
unsigned char GetASCIIKey(unsigned char c);
|
||||
void OSD_PrintText(unsigned char line, char *text, unsigned long start, unsigned long width, unsigned long offset, unsigned char invert);
|
||||
void OsdWriteDoubleSize(unsigned char n, char *s, unsigned char pass);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user