[client] overlay: add modal message dialog support

This commit is contained in:
Geoffrey McRae
2022-01-08 15:37:44 +11:00
parent 0080e5f1b9
commit 780cf5f362
11 changed files with 267 additions and 52 deletions

View File

@@ -238,7 +238,7 @@ static int renderThread(void * unused)
{
/* only update the time if we woke up early */
clock_gettime(CLOCK_MONOTONIC, &time);
tsAdd(&time, g_state.overlayInput ?
tsAdd(&time, app_isOverlayMode() ?
g_state.overlayFrameTime : g_state.frameTime);
}
}
@@ -622,9 +622,10 @@ int main_frameThread(void * unused)
DEBUG_WARN("Recommend increase size to %d MiB", size);
DEBUG_BREAK();
app_alert(LG_ALERT_ERROR,
"IVSHMEM too small, screen truncated\n"
"Recommend increasing size to %d MiB",
app_msgBox(
"IVSHMEM too small",
"IVSHMEM too small\n"
"Please increase the size to %d MiB",
size);
}
@@ -1512,6 +1513,8 @@ int main(int argc, char * argv[])
app_registerOverlay(&LGOverlayFPS , NULL);
app_registerOverlay(&LGOverlayGraphs, NULL);
app_registerOverlay(&LGOverlayHelp , NULL);
app_registerOverlay(&LGOverlayMsg , NULL);
// early renderer setup for option registration
for(unsigned int i = 0; i < LG_RENDERER_COUNT; ++i)