mirror of
https://github.com/AquariaOSE/Aquaria.git
synced 2025-07-04 06:54:39 +00:00
Fixes for Linux
- fixed warning about PlaySfx::handle - fixed displaying subtitles - if the path was not full lowercase it didn't find its txt files. - CMake: removed SDLMAIN_FOUND, which is seemingly only defined on windows and does more harm than good. - glpng: always use new libpng API (fixes windows build)
This commit is contained in:
parent
2d795b5bf7
commit
1ab32b585f
4 changed files with 8 additions and 16 deletions
|
@ -46,7 +46,7 @@ void SubtitlePlayer::go(const std::string &subs)
|
||||||
if (dsq->mod.isActive())
|
if (dsq->mod.isActive())
|
||||||
{
|
{
|
||||||
f = dsq->mod.getPath() + "audio/" + subs + ".txt";
|
f = dsq->mod.getPath() + "audio/" + subs + ".txt";
|
||||||
stringToLower(f);
|
f = core->adjustFilenameCase(f);
|
||||||
if (exists(f))
|
if (exists(f))
|
||||||
checkAfter = false;
|
checkAfter = false;
|
||||||
}
|
}
|
||||||
|
@ -54,7 +54,7 @@ void SubtitlePlayer::go(const std::string &subs)
|
||||||
if (checkAfter)
|
if (checkAfter)
|
||||||
{
|
{
|
||||||
f = "scripts/vox/" + subs + ".txt";
|
f = "scripts/vox/" + subs + ".txt";
|
||||||
stringToLower(f);
|
f = core->adjustFilenameCase(f);
|
||||||
if (!exists(f))
|
if (!exists(f))
|
||||||
{
|
{
|
||||||
debugLog("Could not find subs file [" + subs + "]");
|
debugLog("Could not find subs file [" + subs + "]");
|
||||||
|
|
|
@ -105,7 +105,7 @@ struct PlaySfx
|
||||||
PlaySfx() : priority(0.5), handle(0), pan(0), vol(1), fade(SFT_NONE), time(0), freq(1), loops(0), channel(BBGE_AUDIO_NOCHANNEL) {}
|
PlaySfx() : priority(0.5), handle(0), pan(0), vol(1), fade(SFT_NONE), time(0), freq(1), loops(0), channel(BBGE_AUDIO_NOCHANNEL) {}
|
||||||
|
|
||||||
std::string name;
|
std::string name;
|
||||||
int handle;
|
intptr_t handle;
|
||||||
float pan;
|
float pan;
|
||||||
float vol;
|
float vol;
|
||||||
float time;
|
float time;
|
||||||
|
|
|
@ -148,7 +148,7 @@ OPTION(AQUARIA_INTERNAL_SDL "Always use included SDL library" FALSE)
|
||||||
if(NOT AQUARIA_INTERNAL_SDL)
|
if(NOT AQUARIA_INTERNAL_SDL)
|
||||||
find_package(SDL)
|
find_package(SDL)
|
||||||
endif(NOT AQUARIA_INTERNAL_SDL)
|
endif(NOT AQUARIA_INTERNAL_SDL)
|
||||||
if(NOT SDL_FOUND OR ((MACOSX OR WIN32) AND (NOT SDLMAIN_FOUND)))
|
if(NOT SDL_FOUND)
|
||||||
if(MACOSX)
|
if(MACOSX)
|
||||||
set(SDLDIR "${EXTLIBDIR}/SDL12")
|
set(SDLDIR "${EXTLIBDIR}/SDL12")
|
||||||
set(SDL_INCLUDE_DIR "${SDLDIR}/include")
|
set(SDL_INCLUDE_DIR "${SDLDIR}/include")
|
||||||
|
@ -164,7 +164,7 @@ if(NOT SDL_FOUND OR ((MACOSX OR WIN32) AND (NOT SDLMAIN_FOUND)))
|
||||||
else(MACOSX)
|
else(MACOSX)
|
||||||
message(SEND_ERROR "We don't have a prebuilt SDL for this platform.")
|
message(SEND_ERROR "We don't have a prebuilt SDL for this platform.")
|
||||||
endif(MACOSX)
|
endif(MACOSX)
|
||||||
endif(NOT SDL_FOUND OR ((MACOSX OR WIN32) AND (NOT SDLMAIN_FOUND)))
|
endif(NOT SDL_FOUND)
|
||||||
|
|
||||||
### OpenAL
|
### OpenAL
|
||||||
|
|
||||||
|
|
|
@ -277,11 +277,7 @@ int APIENTRY pngLoadRawF(FILE *fp, pngRawInfo *pinfo) {
|
||||||
endinfo = png_create_info_struct(png);
|
endinfo = png_create_info_struct(png);
|
||||||
|
|
||||||
// DH: added following lines
|
// DH: added following lines
|
||||||
#ifdef LIBPNG_NEW_API
|
|
||||||
if (setjmp(png_jmpbuf(png)))
|
if (setjmp(png_jmpbuf(png)))
|
||||||
#else
|
|
||||||
if (setjmp(png->jmpbuf))
|
|
||||||
#endif
|
|
||||||
{
|
{
|
||||||
png_destroy_read_struct(&png, &info, &endinfo);
|
png_destroy_read_struct(&png, &info, &endinfo);
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -385,11 +381,7 @@ int APIENTRY pngLoadF(FILE *fp, int mipmap, int trans, pngInfo *pinfo) {
|
||||||
endinfo = png_create_info_struct(png);
|
endinfo = png_create_info_struct(png);
|
||||||
|
|
||||||
// DH: added following lines
|
// DH: added following lines
|
||||||
#ifdef LIBPNG_NEW_API
|
|
||||||
if (setjmp(png_jmpbuf(png)))
|
if (setjmp(png_jmpbuf(png)))
|
||||||
#else
|
|
||||||
if (setjmp(png->jmpbuf))
|
|
||||||
#endif
|
|
||||||
{
|
{
|
||||||
png_destroy_read_struct(&png, &info, &endinfo);
|
png_destroy_read_struct(&png, &info, &endinfo);
|
||||||
return 0;
|
return 0;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue