dgfsdh
This commit is contained in:
parent
eb19b3fdc4
commit
9b9eb08445
|
|
@ -130,7 +130,7 @@ elseif(APPLE)
|
||||||
list(APPEND MAIN_SOURCE src/mac-desktop.mm)
|
list(APPEND MAIN_SOURCE src/mac-desktop.mm)
|
||||||
else()
|
else()
|
||||||
find_package(PkgConfig REQUIRED)
|
find_package(PkgConfig REQUIRED)
|
||||||
pkg_check_modules(LINUXPKGS REQUIRED gtk+-2.0 libxfconf-0)
|
pkg_check_modules(LINUXPKGS REQUIRED gtk+-4.0 libxfconf-0)
|
||||||
include_directories(${LINUXPKGS_INCLUDE_DIRS})
|
include_directories(${LINUXPKGS_INCLUDE_DIRS})
|
||||||
add_compile_options(${LINUXPKGS_CFLAGS_OTHER})
|
add_compile_options(${LINUXPKGS_CFLAGS_OTHER})
|
||||||
list(APPEND PLATFORM_LIBRARIES ${LINUXPKGS_LDFLAGS})
|
list(APPEND PLATFORM_LIBRARIES ${LINUXPKGS_LDFLAGS})
|
||||||
|
|
|
||||||
10
src/font.cpp
10
src/font.cpp
|
|
@ -88,7 +88,7 @@ SharedFontState::~SharedFontState()
|
||||||
delete p;
|
delete p;
|
||||||
}
|
}
|
||||||
|
|
||||||
void SharedFontState::initFontSetCB(SDL_RWops &ops,
|
void SharedFontState::initFontSetCB(SDL_IOStream &ops,
|
||||||
const std::string &filename)
|
const std::string &filename)
|
||||||
{
|
{
|
||||||
TTF_Font *font = TTF_OpenFontRW(&ops, 0, 0);
|
TTF_Font *font = TTF_OpenFontRW(&ops, 0, 0);
|
||||||
|
|
@ -96,8 +96,8 @@ void SharedFontState::initFontSetCB(SDL_RWops &ops,
|
||||||
if (!font)
|
if (!font)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
std::string family = TTF_FontFaceFamilyName(font);
|
std::string family = TTF_GetFontFamilyName(font);
|
||||||
std::string style = TTF_FontFaceStyleName(font);
|
std::string style = TTF_GetFontStyleName(font);
|
||||||
|
|
||||||
TTF_CloseFont(font);
|
TTF_CloseFont(font);
|
||||||
|
|
||||||
|
|
@ -133,7 +133,7 @@ _TTF_Font *SharedFontState::getFont(std::string family,
|
||||||
return font;
|
return font;
|
||||||
|
|
||||||
/* Not in pool; open new handle */
|
/* Not in pool; open new handle */
|
||||||
SDL_RWops *ops;
|
SDL_IOStream *ops;
|
||||||
|
|
||||||
if (family.empty())
|
if (family.empty())
|
||||||
{
|
{
|
||||||
|
|
@ -146,7 +146,7 @@ _TTF_Font *SharedFontState::getFont(std::string family,
|
||||||
const char *path = !req.regular.empty()
|
const char *path = !req.regular.empty()
|
||||||
? req.regular.c_str() : req.other.c_str();
|
? req.regular.c_str() : req.other.c_str();
|
||||||
|
|
||||||
ops = SDL_AllocRW();
|
ops = SDL_OpenIO();
|
||||||
shState->fileSystem().openReadRaw(*ops, path, true);
|
shState->fileSystem().openReadRaw(*ops, path, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -28,7 +28,7 @@
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
struct SDL_RWops;
|
struct SDL_IOStream;
|
||||||
struct _TTF_Font;
|
struct _TTF_Font;
|
||||||
struct Config;
|
struct Config;
|
||||||
|
|
||||||
|
|
@ -44,7 +44,7 @@ public:
|
||||||
* (when "Fonts/" is scanned for available assets).
|
* (when "Fonts/" is scanned for available assets).
|
||||||
* 'ops' is an opened handle to a possible font file,
|
* 'ops' is an opened handle to a possible font file,
|
||||||
* 'filename' is the corresponding path */
|
* 'filename' is the corresponding path */
|
||||||
void initFontSetCB(SDL_RWops &ops,
|
void initFontSetCB(SDL_IOStream &ops,
|
||||||
const std::string &filename);
|
const std::string &filename);
|
||||||
|
|
||||||
_TTF_Font *getFont(std::string family,
|
_TTF_Font *getFont(std::string family,
|
||||||
|
|
|
||||||
|
|
@ -24,7 +24,7 @@
|
||||||
#include "boost-hash.h"
|
#include "boost-hash.h"
|
||||||
#include "exception.h"
|
#include "exception.h"
|
||||||
|
|
||||||
#include <SDL_video.h>
|
#include <SDL3/SDL_video.h>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
GLFunctions gl;
|
GLFunctions gl;
|
||||||
|
|
|
||||||
|
|
@ -26,7 +26,7 @@
|
||||||
#include <SDL_opengles2.h>
|
#include <SDL_opengles2.h>
|
||||||
#define APIENTRYP GL_APIENTRYP
|
#define APIENTRYP GL_APIENTRYP
|
||||||
#else
|
#else
|
||||||
#include <SDL_opengl.h>
|
#include <SDL3/SDL_opengl.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Etc */
|
/* Etc */
|
||||||
|
|
|
||||||
|
|
@ -51,7 +51,7 @@ void subRectImageUpload(GLint srcW, GLint srcX, GLint srcY,
|
||||||
|
|
||||||
TEX::uploadSubImage(dstX, dstY, dstW, dstH, tmp->pixels, format);
|
TEX::uploadSubImage(dstX, dstY, dstW, dstH, tmp->pixels, format);
|
||||||
|
|
||||||
SDL_FreeSurface(tmp);
|
SDL_DestroySurface(tmp);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -26,7 +26,7 @@
|
||||||
#include "gl-util.h"
|
#include "gl-util.h"
|
||||||
#include "vertex.h"
|
#include "vertex.h"
|
||||||
|
|
||||||
#include <SDL_surface.h>
|
#include <SDL3/SDL_surface.h>
|
||||||
|
|
||||||
namespace GLMeta
|
namespace GLMeta
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -25,7 +25,7 @@
|
||||||
#include "gl-fun.h"
|
#include "gl-fun.h"
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
|
|
||||||
#include <SDL_rect.h>
|
#include <SDL3/SDL_rect.h>
|
||||||
|
|
||||||
static void applyBool(GLenum state, bool mode)
|
static void applyBool(GLenum state, bool mode)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -39,9 +39,9 @@
|
||||||
#include "debugwriter.h"
|
#include "debugwriter.h"
|
||||||
#include "oneshot.h"
|
#include "oneshot.h"
|
||||||
|
|
||||||
#include <SDL_video.h>
|
#include <SDL3/SDL_video.h>
|
||||||
#include <SDL_timer.h>
|
#include <SDL3/SDL_timer.h>
|
||||||
#include <SDL_image.h>
|
#include <SDL3_image/SDL_image.h>
|
||||||
|
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
#ifndef _MSC_VER
|
#ifndef _MSC_VER
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue