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.
|
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.
|
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.
|
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();
|
ConfigUtility& config = ConfigUtility::GetSingleton();
|
||||||
config.Load("rsc/config.cfg", false, argc, argv);
|
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
|
//create and check the window
|
||||||
//-------------------------
|
//-------------------------
|
||||||
@@ -85,18 +95,15 @@ void ClientApplication::Init(int argc, char* argv[]) {
|
|||||||
switch(windowInfo.subsystem) {
|
switch(windowInfo.subsystem) {
|
||||||
case SDL_SYSWM_WINDOWS:
|
case SDL_SYSWM_WINDOWS:
|
||||||
platform = "Microsoft Windows";
|
platform = "Microsoft Windows";
|
||||||
fontPath = "C:/Windows/Fonts/arialbd.ttf";
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case SDL_SYSWM_X11:
|
case SDL_SYSWM_X11:
|
||||||
platform = "X Window System";
|
platform = "X Window System";
|
||||||
fontPath = "/usr/share/fonts/truetype/msttcorefonts/Arial_Bold.ttf";
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
//NOTE: OS X is currently unsupported, but it could be
|
//NOTE: OS X is currently unsupported, but it could be
|
||||||
case SDL_SYSWM_COCOA:
|
case SDL_SYSWM_COCOA:
|
||||||
platform = "Apple OS X";
|
platform = "Apple OS X";
|
||||||
fontPath = "/System/Library/Fonts/arialbd.ttf";
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
@@ -109,11 +116,6 @@ void ClientApplication::Init(int argc, char* argv[]) {
|
|||||||
std::cout << (int)windowInfo.version.minor << ".";
|
std::cout << (int)windowInfo.version.minor << ".";
|
||||||
std::cout << (int)windowInfo.version.patch << " on ";
|
std::cout << (int)windowInfo.version.patch << " on ";
|
||||||
std::cout << platform << std::endl;
|
std::cout << platform << std::endl;
|
||||||
|
|
||||||
//handle the default font paths
|
|
||||||
if (config["client.font"].size() == 0) {
|
|
||||||
config["client.font"] = fontPath;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
std::ostringstream msg;
|
std::ostringstream msg;
|
||||||
@@ -256,6 +258,7 @@ void ClientApplication::Quit() {
|
|||||||
BaseScene::SetRenderer(nullptr);
|
BaseScene::SetRenderer(nullptr);
|
||||||
SDL_DestroyRenderer(renderer);
|
SDL_DestroyRenderer(renderer);
|
||||||
SDL_DestroyWindow(window);
|
SDL_DestroyWindow(window);
|
||||||
|
SDL_Quit();
|
||||||
std::cout << "Clean exit" << std::endl;
|
std::cout << "Clean exit" << std::endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+2
-3
@@ -13,9 +13,6 @@ server.dbname = database.db
|
|||||||
#client.screen.h = 600
|
#client.screen.h = 600
|
||||||
#client.screen.f = false #NOTE: fullscreen option is currently disabled
|
#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.username = username
|
||||||
client.handle = handle
|
client.handle = handle
|
||||||
client.avatar = character2.png
|
client.avatar = character2.png
|
||||||
@@ -27,8 +24,10 @@ dir.tilesets = rsc/graphics/tilesets/
|
|||||||
dir.interface = rsc/graphics/interface/
|
dir.interface = rsc/graphics/interface/
|
||||||
dir.scripts = rsc/scripts/
|
dir.scripts = rsc/scripts/
|
||||||
dir.maps = rsc/maps/
|
dir.maps = rsc/maps/
|
||||||
|
dir.fonts = rsc/fonts/
|
||||||
|
|
||||||
#map system
|
#map system
|
||||||
map.savename = servermap
|
map.savename = servermap
|
||||||
|
|
||||||
#debugging
|
#debugging
|
||||||
|
client.font = rsc/fonts/coolvetica rg.ttf
|
||||||
Binary file not shown.
Reference in New Issue
Block a user