// 'Main program' equivalent: the program execution "starts" here
bool wxEmulatorApp::OnInit()
{
+#if wxUSE_LOG
wxLog::SetTimestamp(NULL);
+#endif // wxUSE_LOG
wxInitAllImageHandlers();
wxString currentDir = wxGetCwd();
wxEmulatorFrame *frame = new wxEmulatorFrame(_T("wxEmulator"),
wxPoint(50, 50), wxSize(450, 340));
+#if wxUSE_STATUSBAR
frame->SetStatusText(m_emulatorInfo.m_emulatorTitle, 0);
wxString sizeStr;
sizeStr.Printf(wxT("Screen: %dx%d"), (int) m_emulatorInfo.m_emulatorScreenSize.x,
(int) m_emulatorInfo.m_emulatorScreenSize.y);
frame->SetStatusText(sizeStr, 1);
+#endif // wxUSE_STATUSBAR
m_containerWindow = new wxEmulatorContainer(frame, wxID_ANY);
// Convert 6-digit hex string to a colour
wxColour wxHexStringToColour(const wxString& hex)
{
- unsigned int r = wxHexToDec(hex.Mid(0, 2));
- unsigned int g = wxHexToDec(hex.Mid(2, 2));
- unsigned int b = wxHexToDec(hex.Mid(4, 2));
+ unsigned char r = (unsigned char)wxHexToDec(hex.Mid(0, 2));
+ unsigned char g = (unsigned char)wxHexToDec(hex.Mid(2, 2));
+ unsigned char b = (unsigned char)wxHexToDec(hex.Mid(4, 2));
return wxColour(r, g, b);
}