This commit is contained in:
ZakatTeamI2P 2026-03-30 19:41:40 +04:00
parent eb19b3fdc4
commit 9b9eb08445
9 changed files with 16 additions and 16 deletions

View file

@ -130,7 +130,7 @@ elseif(APPLE)
list(APPEND MAIN_SOURCE src/mac-desktop.mm)
else()
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})
add_compile_options(${LINUXPKGS_CFLAGS_OTHER})
list(APPEND PLATFORM_LIBRARIES ${LINUXPKGS_LDFLAGS})

View file

@ -88,7 +88,7 @@ SharedFontState::~SharedFontState()
delete p;
}
void SharedFontState::initFontSetCB(SDL_RWops &ops,
void SharedFontState::initFontSetCB(SDL_IOStream &ops,
const std::string &filename)
{
TTF_Font *font = TTF_OpenFontRW(&ops, 0, 0);
@ -96,8 +96,8 @@ void SharedFontState::initFontSetCB(SDL_RWops &ops,
if (!font)
return;
std::string family = TTF_FontFaceFamilyName(font);
std::string style = TTF_FontFaceStyleName(font);
std::string family = TTF_GetFontFamilyName(font);
std::string style = TTF_GetFontStyleName(font);
TTF_CloseFont(font);
@ -133,7 +133,7 @@ _TTF_Font *SharedFontState::getFont(std::string family,
return font;
/* Not in pool; open new handle */
SDL_RWops *ops;
SDL_IOStream *ops;
if (family.empty())
{
@ -146,7 +146,7 @@ _TTF_Font *SharedFontState::getFont(std::string family,
const char *path = !req.regular.empty()
? req.regular.c_str() : req.other.c_str();
ops = SDL_AllocRW();
ops = SDL_OpenIO();
shState->fileSystem().openReadRaw(*ops, path, true);
}

View file

@ -28,7 +28,7 @@
#include <vector>
#include <string>
struct SDL_RWops;
struct SDL_IOStream;
struct _TTF_Font;
struct Config;
@ -44,7 +44,7 @@ public:
* (when "Fonts/" is scanned for available assets).
* 'ops' is an opened handle to a possible font file,
* 'filename' is the corresponding path */
void initFontSetCB(SDL_RWops &ops,
void initFontSetCB(SDL_IOStream &ops,
const std::string &filename);
_TTF_Font *getFont(std::string family,

View file

@ -24,7 +24,7 @@
#include "boost-hash.h"
#include "exception.h"
#include <SDL_video.h>
#include <SDL3/SDL_video.h>
#include <string>
GLFunctions gl;

View file

@ -26,7 +26,7 @@
#include <SDL_opengles2.h>
#define APIENTRYP GL_APIENTRYP
#else
#include <SDL_opengl.h>
#include <SDL3/SDL_opengl.h>
#endif
/* Etc */

View file

@ -51,7 +51,7 @@ void subRectImageUpload(GLint srcW, GLint srcX, GLint srcY,
TEX::uploadSubImage(dstX, dstY, dstW, dstH, tmp->pixels, format);
SDL_FreeSurface(tmp);
SDL_DestroySurface(tmp);
}
}

View file

@ -26,7 +26,7 @@
#include "gl-util.h"
#include "vertex.h"
#include <SDL_surface.h>
#include <SDL3/SDL_surface.h>
namespace GLMeta
{

View file

@ -25,7 +25,7 @@
#include "gl-fun.h"
#include "config.h"
#include <SDL_rect.h>
#include <SDL3/SDL_rect.h>
static void applyBool(GLenum state, bool mode)
{

View file

@ -39,9 +39,9 @@
#include "debugwriter.h"
#include "oneshot.h"
#include <SDL_video.h>
#include <SDL_timer.h>
#include <SDL_image.h>
#include <SDL3/SDL_video.h>
#include <SDL3/SDL_timer.h>
#include <SDL3_image/SDL_image.h>
#include <time.h>
#ifndef _MSC_VER