webMAN-MOD
webMAN-MOD copied to clipboard
show_msg2 overlaps displaying text
Use this show_msg2 to fix an problem where the messge displays underneath console text especially on dex systeam where it displays console IP/HostName.
https://github.com/aldostools/webMAN-MOD/blob/master/include/show_msg2.h#L29
// vsh_paf.h
extern "C" uint32_t paf_794CEACB(uint32_t plugin, const char* widget); // paf_794CEACB // finds widget in a plugin Example: plugin->FindWidget(return from paf_F21655F3, "page_autooff_guide")
#define FindWidget paf_794CEACB
// in vsh_common.h
extern "C" int vshcommon_F55812AE(int32_t, wchar_t* text, int32_t, int32_t);
#define ShowButtonNavigationText vshcommon_F55812AE
static void show_msg2(char* msg)
{
uint32_t system_plugin_handle = View_Find("system_plugin");
if (system_plugin_handle == 0)
return;
uint32_t widget = FindWidget(system_plugin_handle, "page_autooff_guide");
if (widget == 0)
return;
int len = strlen(msg) + 1;
wchar_t wmsg[len];
mbstowcs((wchar_t*)wmsg, (const char*)msg, len); //size_t stdc_FCAC2E8E(wchar_t *dest, const char *src, size_t max)
for (int i = 0; i < len; i++) if (wmsg[i] == 0x7E) { wmsg[i] = 0xF850 + (u8)wmsg[i + 1], wmsg[++i] = 0x20; }
ShowButtonNavigationText(widget, wmsg, 4, 0);
}
Thanks for your feedback. Your code was added in the recent commit.
I didn't notice any difference on 4.86 CEX modded to show the IP on XMB. The text was slightly above the IP address.
On my screen it's not above the IP address text but underneath the IP address text. Here is the before and after.
Before https://user-images.githubusercontent.com/9206290/120583028-502bb900-c3e2-11eb-8343-4f6ada267d6f.mp4
After https://user-images.githubusercontent.com/9206290/120583246-b31d5000-c3e2-11eb-9717-e58db58030f1.mp4
Thank you for the screenshots. Now I see what you mean.
Maybe I didn't notice that issue on my CEX system because the mod that I use only shows the IP address.