mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-02 15:23:53 -06:00
Add -name option, by Anthony Liguori.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2505 c046a42c-6fe2-441c-8c8c-71466251a162
This commit is contained in:
parent
dcfb90144b
commit
c35734b2a6
6 changed files with 42 additions and 10 deletions
19
sdl.c
19
sdl.c
|
@ -216,13 +216,18 @@ static void sdl_process_key(SDL_KeyboardEvent *ev)
|
|||
static void sdl_update_caption(void)
|
||||
{
|
||||
char buf[1024];
|
||||
strcpy(buf, "QEMU");
|
||||
if (!vm_running) {
|
||||
strcat(buf, " [Stopped]");
|
||||
}
|
||||
if (gui_grab) {
|
||||
strcat(buf, " - Press Ctrl-Alt to exit grab");
|
||||
}
|
||||
const char *status = "";
|
||||
|
||||
if (!vm_running)
|
||||
status = " [Stopped]";
|
||||
else if (gui_grab)
|
||||
status = " - Press Ctrl-Alt to exit grab";
|
||||
|
||||
if (qemu_name)
|
||||
snprintf(buf, sizeof(buf), "QEMU (%s)%s", qemu_name, status);
|
||||
else
|
||||
snprintf(buf, sizeof(buf), "QEMU%s", status);
|
||||
|
||||
SDL_WM_SetCaption(buf, "QEMU");
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue