diff options
author | Nicolas Bacca | 2004-03-03 22:31:28 +0000 |
---|---|---|
committer | Nicolas Bacca | 2004-03-03 22:31:28 +0000 |
commit | 333d2da1da40d3547f823c5a20c8c586a7fc3c43 (patch) | |
tree | 32d16571c35f948a3896e38cf15a3c1c1d901688 /backends/wince | |
parent | 96e910ea7205d78878e9b8eb9492f88099db778c (diff) | |
download | scummvm-rg350-333d2da1da40d3547f823c5a20c8c586a7fc3c43.tar.gz scummvm-rg350-333d2da1da40d3547f823c5a20c8c586a7fc3c43.tar.bz2 scummvm-rg350-333d2da1da40d3547f823c5a20c8c586a7fc3c43.zip |
Add SDL information to track driver problems
svn-id: r13171
Diffstat (limited to 'backends/wince')
-rw-r--r-- | backends/wince/CELauncherDialog.cpp | 34 | ||||
-rw-r--r-- | backends/wince/CELauncherDialog.h | 1 |
2 files changed, 34 insertions, 1 deletions
diff --git a/backends/wince/CELauncherDialog.cpp b/backends/wince/CELauncherDialog.cpp index 7c432f5a20..e8cbdfcd45 100644 --- a/backends/wince/CELauncherDialog.cpp +++ b/backends/wince/CELauncherDialog.cpp @@ -20,10 +20,15 @@ */ #include "stdafx.h" + +#include "wince-sdl.h" + #include "CELauncherDialog.h" #include "base/engine.h" +#include "gui/newgui.h" +#include "gui/widget.h" #include "gui/browser.h" #include "gui/message.h" @@ -32,10 +37,37 @@ using namespace GUI; using namespace Common; +class CEAboutDialog : public Dialog { +public: + CEAboutDialog::CEAboutDialog() + : Dialog(10, 60, 300, 77) { + char tempo[100]; + + addButton((_w - kButtonWidth) / 2, 45, "OK", kCloseCmd, '\r'); // Close dialog - FIXME + + Common::String videoDriver("Using SDL driver "); + SDL_VideoDriverName(tempo, sizeof(tempo)); + videoDriver += tempo; + new StaticTextWidget(this, 0, 10, _w, kLineHeight, videoDriver, kTextAlignCenter); + Common::String displayInfos("Display "); + sprintf(tempo, "%dx%d", GetSystemMetrics(SM_CXSCREEN), GetSystemMetrics(SM_CYSCREEN)); + displayInfos += tempo; + new StaticTextWidget(this, 0, 20, _w, kLineHeight, displayInfos, kTextAlignCenter); + } +}; + CELauncherDialog::CELauncherDialog(GameDetector &detector) : GUI::LauncherDialog(detector) { } +void CELauncherDialog::handleCommand(CommandSender *sender, uint32 cmd, uint32 data) { + LauncherDialog::handleCommand(sender, cmd, data); + if (cmd == 'ABOU') { + CEAboutDialog about; + about.runModal(); + } +} + void CELauncherDialog::addCandidate(String &path, DetectedGameList &candidates) { int idx = -1; DetectedGame result; @@ -47,7 +79,7 @@ void CELauncherDialog::addCandidate(String &path, DetectedGameList &candidates) idx = 0; else { char candidateName[100]; - int i; + unsigned int i; for (i=path.size() - 2; i && path[i] != '\\'; i--); strcpy(candidateName, &path[i + 1]); candidateName[strlen(candidateName) - 1] = '\0'; diff --git a/backends/wince/CELauncherDialog.h b/backends/wince/CELauncherDialog.h index c035ca4ec1..6617b0250b 100644 --- a/backends/wince/CELauncherDialog.h +++ b/backends/wince/CELauncherDialog.h @@ -32,6 +32,7 @@ class CELauncherDialog : public GUI::LauncherDialog { public: CELauncherDialog(GameDetector &detector); + virtual void handleCommand(GUI::CommandSender *sender, uint32 cmd, uint32 data); protected: void addGame(); void addCandidate(String &path, DetectedGameList &candidates); |