mirror of
https://github.com/tildearrow/furnace.git
synced 2024-11-02 02:52:40 +00:00
GUI fail error report
This commit is contained in:
parent
255547188d
commit
54183ce4a2
3 changed files with 8 additions and 3 deletions
|
@ -1993,6 +1993,10 @@ void FurnaceGUI::showError(String what) {
|
|||
displayError=true;
|
||||
}
|
||||
|
||||
String FurnaceGUI::getLastError() {
|
||||
return lastError;
|
||||
}
|
||||
|
||||
// what monster did I just create here?
|
||||
#define B30(tt) (macroDragBit30?((((tt)&0xc0000000)==0x40000000 || ((tt)&0xc0000000)==0x80000000)?0x40000000:0):0)
|
||||
|
||||
|
@ -5017,7 +5021,7 @@ bool FurnaceGUI::init() {
|
|||
|
||||
sdlWin=SDL_CreateWindow("Furnace",scrX,scrY,scrW*dpiScale,scrH*dpiScale,SDL_WINDOW_RESIZABLE|SDL_WINDOW_ALLOW_HIGHDPI|(scrMax?SDL_WINDOW_MAXIMIZED:0)|(fullScreen?SDL_WINDOW_FULLSCREEN_DESKTOP:0));
|
||||
if (sdlWin==NULL) {
|
||||
logE("could not open window! %s",SDL_GetError());
|
||||
lastError=fmt::sprintf("could not open window! %s",SDL_GetError());
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -5072,7 +5076,7 @@ bool FurnaceGUI::init() {
|
|||
sdlRend=SDL_CreateRenderer(sdlWin,-1,SDL_RENDERER_ACCELERATED|SDL_RENDERER_PRESENTVSYNC|SDL_RENDERER_TARGETTEXTURE);
|
||||
|
||||
if (sdlRend==NULL) {
|
||||
logE("could not init renderer! %s",SDL_GetError());
|
||||
lastError=fmt::sprintf("could not init renderer! %s",SDL_GetError());
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
@ -1802,6 +1802,7 @@ class FurnaceGUI {
|
|||
public:
|
||||
void showWarning(String what, FurnaceGUIWarnings type);
|
||||
void showError(String what);
|
||||
String getLastError();
|
||||
const char* noteNameNormal(short note, short octave);
|
||||
const char* noteName(short note, short octave);
|
||||
bool decodeNote(const char* what, short& note, short& octave);
|
||||
|
|
|
@ -549,7 +549,7 @@ int main(int argc, char** argv) {
|
|||
#ifdef HAVE_GUI
|
||||
g.bindEngine(&e);
|
||||
if (!g.init()) {
|
||||
reportError("error while starting GUI!");
|
||||
reportError(g.getLastError());
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue