mirror of
https://forgejo.xatacraft.ru/Sunshine/mkxp-sunshine.git
synced 2026-08-19 13:29:54 +00:00
BSD build support
This commit is contained in:
parent
ae51f718ce
commit
278f016684
3 changed files with 22 additions and 28 deletions
|
|
@ -153,6 +153,15 @@ elseif(LINUX)
|
|||
list(APPEND PLATFORM_LIBRARIES ${LINUXPKGS_LDFLAGS})
|
||||
list(APPEND MAIN_SOURCE src/xdg-user-dir-lookup.c)
|
||||
list(APPEND MAIN_HEADERS src/xdg-user-dir-lookup.h)
|
||||
elseif(BSD)
|
||||
find_package(PkgConfig REQUIRED)
|
||||
pkg_check_modules(LINUXPKGS REQUIRED gtk+-3.0 libxfconf-0)
|
||||
include_directories(${LINUXPKGS_INCLUDE_DIRS})
|
||||
add_compile_options(${LINUXPKGS_CFLAGS_OTHER})
|
||||
list(APPEND PLATFORM_LIBRARIES ${LINUXPKGS_LDFLAGS})
|
||||
list(APPEND MAIN_SOURCE src/xdg-user-dir-lookup.c)
|
||||
list(APPEND MAIN_HEADERS src/xdg-user-dir-lookup.h)
|
||||
set(STEAM OFF)
|
||||
endif()
|
||||
|
||||
if (STEAM)
|
||||
|
|
@ -283,7 +292,7 @@ set(BINDING_SOURCE
|
|||
binding-mri/module_rpg.cpp
|
||||
binding-mri/filesystem-binding.cpp
|
||||
binding-mri/oneshot-binding.cpp
|
||||
binding-mri/sunshine-binding.cpp
|
||||
binding-mri/sunshine-binding.cpp
|
||||
binding-mri/steam-binding.cpp
|
||||
binding-mri/wallpaper-binding.cpp
|
||||
binding-mri/journal-binding.cpp
|
||||
|
|
|
|||
|
|
@ -125,8 +125,7 @@ struct BitmapPrivate{
|
|||
|
||||
void addTaintedArea(const IntRect &rect){
|
||||
IntRect norm = normalizedRect(rect);
|
||||
pixman_region_union_rect
|
||||
(&tainted, &tainted, norm.x, norm.y, norm.w, norm.h);
|
||||
pixman_region_union_rect(&tainted, &tainted, norm.x, norm.y, norm.w, norm.h);
|
||||
}
|
||||
|
||||
void substractTaintedArea(const IntRect &rect){
|
||||
|
|
@ -148,8 +147,7 @@ struct BitmapPrivate{
|
|||
box.x2 = rect.x + rect.w;
|
||||
box.y2 = rect.y + rect.h;
|
||||
|
||||
pixman_region_overlap_t result =
|
||||
pixman_region_contains_rectangle(&tainted, &box);
|
||||
pixman_region_overlap_t result = pixman_region_contains_rectangle(&tainted, &box);
|
||||
|
||||
return result != PIXMAN_REGION_OUT;
|
||||
}
|
||||
|
|
@ -1103,8 +1101,7 @@ void Bitmap::drawText(const IntRect &rect, const char *str, int align){
|
|||
|
||||
/* http://www.lemoda.net/c/utf8-to-ucs2/index.html */
|
||||
static uint16_t utf8_to_ucs2(const char *_input, const char **end_ptr){
|
||||
const unsigned char *input =
|
||||
reinterpret_cast<const unsigned char*>(_input);
|
||||
const unsigned char *input = reinterpret_cast<const unsigned char*>(_input);
|
||||
*end_ptr = _input;
|
||||
|
||||
if (input[0] == 0)
|
||||
|
|
|
|||
30
src/bitmap.h
30
src/bitmap.h
|
|
@ -48,26 +48,17 @@ public:
|
|||
int height() const;
|
||||
IntRect rect() const;
|
||||
|
||||
void blt(int x, int y,
|
||||
const Bitmap &source, IntRect rect,
|
||||
int opacity = 255);
|
||||
void blt(int x, int y, const Bitmap &source, IntRect rect, int opacity = 255);
|
||||
|
||||
void stretchBlt(const IntRect &destRect,
|
||||
const Bitmap &source, const IntRect &sourceRect,
|
||||
int opacity = 255);
|
||||
void stretchBlt(const IntRect &destRect, const Bitmap &source, const IntRect &sourceRect, int opacity = 255);
|
||||
|
||||
void fillRect(int x, int y, int width, int height, const Vec4 &color);
|
||||
|
||||
void fillRect(int x, int y,
|
||||
int width, int height,
|
||||
const Vec4 &color);
|
||||
void fillRect(const IntRect &rect, const Vec4 &color);
|
||||
|
||||
void gradientFillRect(int x, int y,
|
||||
int width, int height,
|
||||
const Vec4 &color1, const Vec4 &color2,
|
||||
bool vertical = false);
|
||||
void gradientFillRect(const IntRect &rect,
|
||||
const Vec4 &color1, const Vec4 &color2,
|
||||
bool vertical = false);
|
||||
void gradientFillRect(int x, int y, int width, int height, const Vec4 &color1, const Vec4 &color2, bool vertical = false);
|
||||
|
||||
void gradientFillRect(const IntRect &rect, const Vec4 &color1, const Vec4 &color2, bool vertical = false);
|
||||
|
||||
void clearRect(int x, int y,
|
||||
int width, int height);
|
||||
|
|
@ -89,12 +80,9 @@ public:
|
|||
Right = 2
|
||||
};
|
||||
|
||||
void drawText(int x, int y,
|
||||
int width, int height,
|
||||
const char *str, int align = Left);
|
||||
void drawText(int x, int y, int width, int height, const char *str, int align = Left);
|
||||
|
||||
void drawText(const IntRect &rect,
|
||||
const char *str, int align = Left);
|
||||
void drawText(const IntRect &rect, const char *str, int align = Left);
|
||||
|
||||
IntRect textSize(const char *str);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue