GUI fail error report
This commit is contained in:
parent
255547188d
commit
54183ce4a2
|
@ -1993,6 +1993,10 @@ void FurnaceGUI::showError(String what) {
|
||||||
displayError=true;
|
displayError=true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
String FurnaceGUI::getLastError() {
|
||||||
|
return lastError;
|
||||||
|
}
|
||||||
|
|
||||||
// what monster did I just create here?
|
// what monster did I just create here?
|
||||||
#define B30(tt) (macroDragBit30?((((tt)&0xc0000000)==0x40000000 || ((tt)&0xc0000000)==0x80000000)?0x40000000:0):0)
|
#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));
|
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) {
|
if (sdlWin==NULL) {
|
||||||
logE("could not open window! %s",SDL_GetError());
|
lastError=fmt::sprintf("could not open window! %s",SDL_GetError());
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -5072,7 +5076,7 @@ bool FurnaceGUI::init() {
|
||||||
sdlRend=SDL_CreateRenderer(sdlWin,-1,SDL_RENDERER_ACCELERATED|SDL_RENDERER_PRESENTVSYNC|SDL_RENDERER_TARGETTEXTURE);
|
sdlRend=SDL_CreateRenderer(sdlWin,-1,SDL_RENDERER_ACCELERATED|SDL_RENDERER_PRESENTVSYNC|SDL_RENDERER_TARGETTEXTURE);
|
||||||
|
|
||||||
if (sdlRend==NULL) {
|
if (sdlRend==NULL) {
|
||||||
logE("could not init renderer! %s",SDL_GetError());
|
lastError=fmt::sprintf("could not init renderer! %s",SDL_GetError());
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1802,6 +1802,7 @@ class FurnaceGUI {
|
||||||
public:
|
public:
|
||||||
void showWarning(String what, FurnaceGUIWarnings type);
|
void showWarning(String what, FurnaceGUIWarnings type);
|
||||||
void showError(String what);
|
void showError(String what);
|
||||||
|
String getLastError();
|
||||||
const char* noteNameNormal(short note, short octave);
|
const char* noteNameNormal(short note, short octave);
|
||||||
const char* noteName(short note, short octave);
|
const char* noteName(short note, short octave);
|
||||||
bool decodeNote(const char* what, 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
|
#ifdef HAVE_GUI
|
||||||
g.bindEngine(&e);
|
g.bindEngine(&e);
|
||||||
if (!g.init()) {
|
if (!g.init()) {
|
||||||
reportError("error while starting GUI!");
|
reportError(g.getLastError());
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue