Skip to content

Commit

Permalink
Fix utils.h and lbz2
Browse files Browse the repository at this point in the history
Adds support for plain VitaSDK installation and fix BZ2. utils.h is not recognized by VitaSDK on a plain install.

utils.h uses defines from vita2d.
  • Loading branch information
imnltsa committed Nov 20, 2023
1 parent 3538a40 commit 65abaf8
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ LIBS = -lcurl -lssl -lcrypto -lvorbisfile -lvorbis -logg -lsndfile -lvita2d -lSc
-lspeexdsp -lmpg123 -lSceAudio_stub -lSceGxm_stub -lSceDisplay_stub -lSceShellSvc_stub -limagequant \
-lopusfile -lFLAC -lvorbis -lvorbisenc -lopus -lSceHttp_stub -lSceAudioIn_stub -lluajit-5.1 -ldl \
-ltaihen_stub -lSceKernelModulemgr_stub -lSceSblSsMgr_stub -lSceSysmodule_stub -lSceShutterSound_stub \
-lSceSsl_stub -lSceVshBridge_stub -lSceAvPlayer_stub -lSceRegistryMgr_stub
-lSceSsl_stub -lSceVshBridge_stub -lSceAvPlayer_stub -lSceRegistryMgr_stub -lbz2

CFILES := $(foreach dir,$(SOURCES), $(wildcard $(dir)/*.c))
CPPFILES := $(foreach dir,$(SOURCES), $(wildcard $(dir)/*.cpp))
Expand Down
8 changes: 7 additions & 1 deletion source/include/utils.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
// Misc utils
#define ALIGN(x, a) (((x) + ((a) - 1)) & ~((a) - 1))

// ASCII / UTF16 compatibility
void utf2ascii(char* dst, uint16_t* src);
void ascii2utf(uint16_t* dst, char* src);
void ascii2utf(uint16_t* dst, char* src);

// GPU utils
void *gpu_alloc(SceKernelMemBlockType type, unsigned int size, unsigned int alignment, unsigned int attribs, SceUID *uid);
void gpu_free(SceUID uid);
2 changes: 1 addition & 1 deletion source/luaGraphics.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
#include <string.h>
#include <vitasdk.h>
#include <vita2d.h>
#include <utils.h>
#include "include/utils.h"
#include "include/luaplayer.h"

extern "C"{
Expand Down
1 change: 1 addition & 0 deletions source/luaNetwork.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
#define NET_INIT_SIZE 1*1024*1024
#include <vitasdk.h>
#include <curl/curl.h>
#include <cstring>
#include "include/luaplayer.h"

extern "C"{
Expand Down
2 changes: 1 addition & 1 deletion source/luaRender.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
#include <string.h>
#include <vitasdk.h>
extern "C"{
#include <utils.h> // utils.h file from vita2d
#include "include/utils.h"
}
#include <vita2d.h>
#include "include/luaplayer.h"
Expand Down
2 changes: 1 addition & 1 deletion source/luaVideo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
#include <unistd.h>
#include <vitasdk.h>
extern "C"{
#include <utils.h> // utils.h file from vita2d
#include "include/utils.h"
}
#include "include/luaplayer.h"

Expand Down

0 comments on commit 65abaf8

Please sign in to comment.