From a8c01b178386fdf52a40051863c74a1ef29e9de5 Mon Sep 17 00:00:00 2001 From: "simon.kagstrom" Date: Sun, 24 Jan 2010 08:49:52 +0000 Subject: [PATCH] 100 ms timeout for info loading --- disc_menu.cpp | 2 +- game_info.cpp | 15 ++++++++++++++- game_info.hh | 3 +++ 3 files changed, 18 insertions(+), 2 deletions(-) diff --git a/disc_menu.cpp b/disc_menu.cpp index d611094..8ff1af3 100644 --- a/disc_menu.cpp +++ b/disc_menu.cpp @@ -60,7 +60,7 @@ public: virtual void hoverCallback(int which) { - Gui::gui->timerController->arm(this, 5); + Gui::gui->timerController->arm(this, 100); } virtual void timeoutCallback() diff --git a/game_info.cpp b/game_info.cpp index abc011b..a76a377 100644 --- a/game_info.cpp +++ b/game_info.cpp @@ -7,7 +7,20 @@ #include "utils.hh" #define VERSION_BASE (0x1978) -#define VERSION_MAGIC (VERSION_BASE + 1) +#define VERSION_MAGIC (VERSION_BASE + 0) + +struct game_info_v0 +{ + uint32_t sz; + uint16_t version_magic; + + uint16_t author_off; + uint16_t name_off; + uint16_t screenshot_off; /* In PNG format */ + uint16_t filename_off; + uint16_t flags; + uint8_t data[]; /* 4-byte aligned */ +}; GameInfo::GameInfo(const char *filename, const char *name, const char *author, diff --git a/game_info.hh b/game_info.hh index 397cd86..6bfdca0 100644 --- a/game_info.hh +++ b/game_info.hh @@ -5,8 +5,10 @@ struct game_info { + /* These two MUST stay the same */ uint32_t sz; uint16_t version_magic; + uint16_t author_off; uint16_t name_off; uint16_t screenshot_off; /* In PNG format */ @@ -15,6 +17,7 @@ struct game_info uint8_t data[]; /* 4-byte aligned */ }; + class GameInfo { public: