HOTFIX: User reported a segfault in Wine
This commit is contained in:
@@ -44,3 +44,8 @@ Permission is granted to anyone to use this software for any purpose, including
|
||||
1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
|
||||
2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
|
||||
### Items not made by me
|
||||
|
||||
* [Coolvetica Font](http://typodermicfonts.com/coolvetica/)
|
||||
* Creative Commons Artwork from [Artsader](http://www.moosader.com/artsader/)
|
||||
@@ -44,6 +44,16 @@ void ClientApplication::Init(int argc, char* argv[]) {
|
||||
ConfigUtility& config = ConfigUtility::GetSingleton();
|
||||
config.Load("rsc/config.cfg", false, argc, argv);
|
||||
|
||||
//-------------------------
|
||||
//Initialize SDL
|
||||
//-------------------------
|
||||
|
||||
if (SDL_Init(0)) {
|
||||
std::ostringstream msg;
|
||||
msg << "Failed to initialize SDL: " << SDL_GetError();
|
||||
throw(std::runtime_error(msg.str()));
|
||||
}
|
||||
|
||||
//-------------------------
|
||||
//create and check the window
|
||||
//-------------------------
|
||||
@@ -85,18 +95,15 @@ void ClientApplication::Init(int argc, char* argv[]) {
|
||||
switch(windowInfo.subsystem) {
|
||||
case SDL_SYSWM_WINDOWS:
|
||||
platform = "Microsoft Windows";
|
||||
fontPath = "C:/Windows/Fonts/arialbd.ttf";
|
||||
break;
|
||||
|
||||
case SDL_SYSWM_X11:
|
||||
platform = "X Window System";
|
||||
fontPath = "/usr/share/fonts/truetype/msttcorefonts/Arial_Bold.ttf";
|
||||
break;
|
||||
|
||||
//NOTE: OS X is currently unsupported, but it could be
|
||||
case SDL_SYSWM_COCOA:
|
||||
platform = "Apple OS X";
|
||||
fontPath = "/System/Library/Fonts/arialbd.ttf";
|
||||
break;
|
||||
|
||||
default:
|
||||
@@ -109,11 +116,6 @@ void ClientApplication::Init(int argc, char* argv[]) {
|
||||
std::cout << (int)windowInfo.version.minor << ".";
|
||||
std::cout << (int)windowInfo.version.patch << " on ";
|
||||
std::cout << platform << std::endl;
|
||||
|
||||
//handle the default font paths
|
||||
if (config["client.font"].size() == 0) {
|
||||
config["client.font"] = fontPath;
|
||||
}
|
||||
}
|
||||
else {
|
||||
std::ostringstream msg;
|
||||
@@ -256,6 +258,7 @@ void ClientApplication::Quit() {
|
||||
BaseScene::SetRenderer(nullptr);
|
||||
SDL_DestroyRenderer(renderer);
|
||||
SDL_DestroyWindow(window);
|
||||
SDL_Quit();
|
||||
std::cout << "Clean exit" << std::endl;
|
||||
}
|
||||
|
||||
|
||||
+2
-3
@@ -13,9 +13,6 @@ server.dbname = database.db
|
||||
#client.screen.h = 600
|
||||
#client.screen.f = false #NOTE: fullscreen option is currently disabled
|
||||
|
||||
#set this to overwrite the default fonts (platform issues)
|
||||
#client.font = /path/to/font/file.ttf
|
||||
|
||||
client.username = username
|
||||
client.handle = handle
|
||||
client.avatar = character2.png
|
||||
@@ -27,8 +24,10 @@ dir.tilesets = rsc/graphics/tilesets/
|
||||
dir.interface = rsc/graphics/interface/
|
||||
dir.scripts = rsc/scripts/
|
||||
dir.maps = rsc/maps/
|
||||
dir.fonts = rsc/fonts/
|
||||
|
||||
#map system
|
||||
map.savename = servermap
|
||||
|
||||
#debugging
|
||||
client.font = rsc/fonts/coolvetica rg.ttf
|
||||
Binary file not shown.
Reference in New Issue
Block a user