mirror of
https://github.com/VincentWei/MiniGUI.git
synced 2026-02-07 11:01:57 +08:00
handling mdev in INPUT structure
This commit is contained in:
@@ -291,7 +291,8 @@ int mg_InitIAL (void)
|
||||
return ERR_NO_MATCH;
|
||||
}
|
||||
|
||||
//strcpy (__mg_cur_input->mdev, mdev);
|
||||
/* BUGFIXING (VM 2020-03-12): merged from 5.0.0 */
|
||||
__mg_cur_input->mdev = strdup (mdev);
|
||||
|
||||
if (!IAL_InitInput (__mg_cur_input, mdev, mtype)) {
|
||||
_ERR_PRINTF ("IAL: Failed to initialize the IAL engine: %s.\n", __mg_cur_input->id);
|
||||
@@ -306,8 +307,12 @@ int mg_InitIAL (void)
|
||||
|
||||
void mg_TerminateIAL (void)
|
||||
{
|
||||
if (__mg_cur_input && __mg_cur_input->term_input) {
|
||||
IAL_TermInput ();
|
||||
if (__mg_cur_input) {
|
||||
if (__mg_cur_input->mdev)
|
||||
free (__mg_cur_input->mdev);
|
||||
|
||||
if (__mg_cur_input->term_input)
|
||||
IAL_TermInput ();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user