1
0
mirror of https://github.com/mist-devel/mist-firmware.git synced 2026-05-02 06:36:16 +00:00

Added display of core name in scrolling helptext (in the first screen of 8-bit core)

This commit is contained in:
Newsdee
2016-06-05 23:41:12 +08:00
parent 0b41f47263
commit 8f54e5acb9
2 changed files with 22 additions and 2 deletions

13
menu.c
View File

@@ -116,6 +116,9 @@ const char *helptexts[]={
0
};
// one screen width
const char* HELPTEXT_SPACER= " ";
char helptext_custom[320];
const char* scanlines[]={"Off","25%","50%","75%"};
const char* stereo[]={"Mono","Stereo"};
@@ -621,7 +624,7 @@ void HandleUI(void)
case MENU_8BIT_MAIN1: {
char entry=0;
helptext=helptexts[HELPTEXT_MAIN];
menumask=0;
p = user_io_get_core_name();
if(!p[0]) OsdSetTitle("8BIT", OSD_ARROW_RIGHT);
@@ -723,6 +726,14 @@ void HandleUI(void)
menustate = MENU_8BIT_MAIN2;
parentstate=MENU_8BIT_MAIN1;
// set helptext with core display on top of basic info
siprintf(helptext_custom, HELPTEXT_SPACER);
strcat(helptext_custom, "Now running [");
strcat(helptext_custom, OsdCoreName());
strcat(helptext_custom, "]");
strcat(helptext_custom, helptexts[HELPTEXT_MAIN]);
helptext=helptext_custom;
} break; // end MENU_8BIT_MAIN1
case MENU_8BIT_MAIN2 :

11
osd.h
View File

@@ -132,9 +132,18 @@ void StarsUpdate();
void OsdKeySet(unsigned char);
unsigned char OsdKeyGet();
/*****
* Various functions to retrieve hardware state from the OSD
*/
// State of first (virtual) internal joystisk i.e. after mapping
void OsdJoySet(unsigned char);
unsigned char OsdJoyGet();
void OsdJoySet2(unsigned char); //second joystick
void OsdJoySetExtra(unsigned char);
unsigned char OsdJoyGetExtra();
// State of second (virtual) joystisk
void OsdJoySet2(unsigned char);
unsigned char OsdJoyGet2();
// Keep track of connected sticks