mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-12 21:47:00 -04:00
Prevented some crashes from uncaught exceptions
Moved mse.ico to app.ico Fixed the Linux version of load_resource_icon(). git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@388 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
@@ -15,6 +15,6 @@ AM_LDFLAGS = @WX_LIBS@
|
|||||||
|
|
||||||
magicseteditor_SOURCES =
|
magicseteditor_SOURCES =
|
||||||
|
|
||||||
# The script used to generate is MakeAM. " > Makefile.am;
|
# The script used to generate is MakeAM.sh " > Makefile.am;
|
||||||
|
|
||||||
find . -name *.cpp | sed "s/\./magicseteditor_SOURCES += ./" >> Makefile.am;
|
find . -name *.cpp | sed "s/\./magicseteditor_SOURCES += ./" >> Makefile.am;
|
||||||
+1
-1
@@ -116,7 +116,7 @@ wxIcon load_resource_icon(const String& name) {
|
|||||||
#if defined(__WXMSW__)
|
#if defined(__WXMSW__)
|
||||||
return wxIcon(_("icon/") + name);
|
return wxIcon(_("icon/") + name);
|
||||||
#else
|
#else
|
||||||
static String path = wxStandardPaths::Get().GetDataDir() + _("/icon/");
|
static String path = wxStandardPaths::Get().GetDataDir() + _("/resource/icon/");
|
||||||
return wxIcon(path + name + _(".ico"), wxBITMAP_TYPE_ICO);
|
return wxIcon(path + name + _(".ico"), wxBITMAP_TYPE_ICO);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 5.1 KiB After Width: | Height: | Size: 5.1 KiB |
@@ -8,7 +8,7 @@
|
|||||||
|
|
||||||
// -------------------------------------------------------- : Icons
|
// -------------------------------------------------------- : Icons
|
||||||
|
|
||||||
icon/app ICON "icon/mse.ico" // has to come first in alphabet!!
|
icon/app ICON "icon/app.ico" // has to come first in alphabet!!
|
||||||
icon/export ICON "icon/set.ico" //todo
|
icon/export ICON "icon/set.ico" //todo
|
||||||
icon/game ICON "icon/set.ico" //todo
|
icon/game ICON "icon/set.ico" //todo
|
||||||
icon/set ICON "icon/set.ico"
|
icon/set ICON "icon/set.ico"
|
||||||
@@ -163,7 +163,7 @@ FILETYPE VFT_APP
|
|||||||
VALUE "License", "GNU General Public License 2 or later; This is free software, and you are welcome to redistribute it under certain conditions; See the help file for details"
|
VALUE "License", "GNU General Public License 2 or later; This is free software, and you are welcome to redistribute it under certain conditions; See the help file for details"
|
||||||
VALUE "FileDescription", "Magic Set Editor"
|
VALUE "FileDescription", "Magic Set Editor"
|
||||||
VALUE "InternalName", "mse2/8"
|
VALUE "InternalName", "mse2/8"
|
||||||
VALUE "LegalCopyright", "© 2001-2007 Twan van Laarhoven"
|
VALUE "LegalCopyright", "� 2001-2007 Twan van Laarhoven"
|
||||||
VALUE "ProductName", "Magic Set Editor"
|
VALUE "ProductName", "Magic Set Editor"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+14
-9
@@ -33,16 +33,21 @@ Image ScriptableImage::generate(const GeneratedImage::Options& options, bool cac
|
|||||||
// cached, so we are done
|
// cached, so we are done
|
||||||
return cached;
|
return cached;
|
||||||
}
|
}
|
||||||
// generate
|
// generate blank image
|
||||||
Image image;
|
Image image(1,1);
|
||||||
|
image.InitAlpha();
|
||||||
|
image.SetAlpha(0,0,0);
|
||||||
if (isReady()) {
|
if (isReady()) {
|
||||||
image = value->generate(options);
|
try {
|
||||||
} else {
|
image = value->generate(options);
|
||||||
// error, return blank image
|
}
|
||||||
Image i(1,1);
|
catch (FileNotFoundError e) {
|
||||||
i.InitAlpha();
|
handle_error (e);
|
||||||
i.SetAlpha(0,0,0);
|
return image;
|
||||||
image = i;
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
return image;
|
||||||
}
|
}
|
||||||
// resize?
|
// resize?
|
||||||
int iw = image.GetWidth(), ih = image.GetHeight();
|
int iw = image.GetWidth(), ih = image.GetHeight();
|
||||||
|
|||||||
Reference in New Issue
Block a user