mirror of
https://github.com/blupi-games/planetblupi
synced 2024-12-30 10:15:36 +01:00
Add initial stuff to use SDL_ttf
This commit is contained in:
parent
e9c99fbad9
commit
0631474c23
@ -157,6 +157,9 @@ if (NOT BUILD_JS)
|
|||||||
pkg_search_module (SDL2_IMAGE REQUIRED SDL2_image)
|
pkg_search_module (SDL2_IMAGE REQUIRED SDL2_image)
|
||||||
include_directories (${SDL2_IMAGE_INCLUDE_DIRS})
|
include_directories (${SDL2_IMAGE_INCLUDE_DIRS})
|
||||||
set (planetblupi_DEPS ${planetblupi_DEPS} ${SDL2_IMAGE_STATIC_LIBRARIES})
|
set (planetblupi_DEPS ${planetblupi_DEPS} ${SDL2_IMAGE_STATIC_LIBRARIES})
|
||||||
|
pkg_search_module (SDL2_TTF REQUIRED SDL2_ttf)
|
||||||
|
include_directories (${SDL2_TTF_INCLUDE_DIRS})
|
||||||
|
set (planetblupi_DEPS ${planetblupi_DEPS} ${SDL2_TTF_STATIC_LIBRARIES})
|
||||||
pkg_search_module (SDL2_MIXER REQUIRED SDL2_mixer)
|
pkg_search_module (SDL2_MIXER REQUIRED SDL2_mixer)
|
||||||
include_directories (${SDL2_MIXER_INCLUDE_DIRS})
|
include_directories (${SDL2_MIXER_INCLUDE_DIRS})
|
||||||
set (planetblupi_DEPS ${planetblupi_DEPS} ${SDL2_MIXER_STATIC_LIBRARIES})
|
set (planetblupi_DEPS ${planetblupi_DEPS} ${SDL2_MIXER_STATIC_LIBRARIES})
|
||||||
@ -233,6 +236,7 @@ else ()
|
|||||||
${SDL2_LIBRARIES}
|
${SDL2_LIBRARIES}
|
||||||
${SDL2_MIXER_LIBRARIES}
|
${SDL2_MIXER_LIBRARIES}
|
||||||
${SDL2_IMAGE_LIBRARIES}
|
${SDL2_IMAGE_LIBRARIES}
|
||||||
|
${SDL2_TTF_LIBRARIES}
|
||||||
${CURL_LIBRARIES}
|
${CURL_LIBRARIES}
|
||||||
${SDLKitchensink_LIBRARIES}
|
${SDLKitchensink_LIBRARIES}
|
||||||
pthread
|
pthread
|
||||||
|
@ -32,6 +32,7 @@
|
|||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
#include <SDL_image.h>
|
#include <SDL_image.h>
|
||||||
|
#include <SDL_ttf.h>
|
||||||
#include <argagg/argagg.hpp>
|
#include <argagg/argagg.hpp>
|
||||||
#ifdef USE_CURL
|
#ifdef USE_CURL
|
||||||
#include <curl/curl.h>
|
#include <curl/curl.h>
|
||||||
@ -801,6 +802,11 @@ DoInit (int argc, char * argv[], bool & exit)
|
|||||||
return EXIT_FAILURE;
|
return EXIT_FAILURE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (TTF_Init () < 0) {
|
||||||
|
SDL_Log ("Couldn't initialize TTF: %s", SDL_GetError ());
|
||||||
|
return EXIT_FAILURE;
|
||||||
|
}
|
||||||
|
|
||||||
if (!(g_settingsOverload & SETTING_LEGACY))
|
if (!(g_settingsOverload & SETTING_LEGACY))
|
||||||
Display::getDisplay ().readDisplaySize ();
|
Display::getDisplay ().readDisplaySize ();
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user