Gtk: Fix recent menu. Add game name to title.

This commit is contained in:
BearOso 2020-07-30 18:24:54 -05:00
parent e26649c242
commit bdd061847e
1 changed files with 13 additions and 2 deletions

View File

@ -756,8 +756,8 @@ bool Snes9xWindow::try_open_rom(std::string filename)
data.groups = { "cartridge" };
data.is_private = false;
data.app_exec = Glib::get_prgname() + " %f";
Glib::filename_to_uri(filename);
Gtk::RecentManager::get_default()->add_item(filename, data);
auto uri = Glib::filename_to_uri(filename);
Gtk::RecentManager::get_default()->add_item(uri, data);
unpause_from_user();
unpause_from_focus_change();
@ -984,6 +984,17 @@ void Snes9xWindow::configure_widgets()
hide_mouse_cursor();
else
show_mouse_cursor();
if (config->rom_loaded)
{
std::string title = S9xBasenameNoExt(Memory.ROMFilename);
title += " - Snes9x";
window->set_title(title);
}
else
{
window->set_title("Snes9x");
}
}
void Snes9xWindow::set_mouseable_area(int x, int y, int width, int height)