SDL2 backend is up-to-date.
This commit is contained in:
parent
43e0fe4b6e
commit
a67e998c28
2 changed files with 9 additions and 16 deletions
|
@ -2,7 +2,7 @@ JOEY = /home/scott/joey
|
|||
#CONFIG += SDL12
|
||||
CONFIG += SDL2
|
||||
|
||||
BREW = /home/linuxbrew/.linuxbrew
|
||||
#BREW = /home/linuxbrew/.linuxbrew
|
||||
|
||||
TEMPLATE = app
|
||||
CONFIG += console
|
||||
|
@ -19,11 +19,11 @@ defined(BREW,var) {
|
|||
-Wl,-rpath,$$STATICLIB
|
||||
} else {
|
||||
# Use our libraries.
|
||||
STATICLIB = $$JOEY/sdks/linux/x64/lib
|
||||
INCLUDEPATH += $$JOEY/sdks/linux/x64/include
|
||||
LIBS += \
|
||||
-L$$STATICLIB \
|
||||
-Wl,-rpath,$$STATICLIB
|
||||
#STATICLIB = $$JOEY/sdks/linux/x64/lib
|
||||
#INCLUDEPATH += $$JOEY/sdks/linux/x64/include
|
||||
#LIBS += \
|
||||
# -L$$STATICLIB \
|
||||
# -Wl,-rpath,$$STATICLIB
|
||||
}
|
||||
|
||||
INCLUDEPATH += $$PWD/src
|
||||
|
|
|
@ -96,7 +96,6 @@ static jbool _jlModPlaying = jfalse;
|
|||
static jlPlatformModT *_jlModCurrent = NULL;
|
||||
static jbyte _jlModVolume = 255;
|
||||
static jlSoundPlayingT *_jlSoundList = NULL;
|
||||
static jbyte _jlSoundsPlaying = 0;
|
||||
static jint16 _jlWindowZoom = 2;
|
||||
|
||||
|
||||
|
@ -250,15 +249,12 @@ static void _jlAudioCallback(void *userdata, Uint8 *buffer, int bytes) {
|
|||
temp = sound;
|
||||
sound = sound->next;
|
||||
jlFree(temp);
|
||||
_jlSoundsPlaying--;
|
||||
} else {
|
||||
prev = sound;
|
||||
sound = sound->next;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
jlUtilSay("");
|
||||
}
|
||||
|
||||
|
||||
|
@ -274,7 +270,6 @@ void jlDisplayPresent(void) {
|
|||
|
||||
// Render 4 bit copy to proper pixel format.
|
||||
// This extra step preserves palette effects.
|
||||
|
||||
SDL_LockTexture(_jlTexture, NULL, &pixelData, &pitch);
|
||||
pixels = (Uint32 *)pixelData;
|
||||
for (int y=0; y<200; y++) {
|
||||
|
@ -569,7 +564,6 @@ void jlSoundPlay(jlSoundT *sound, jlSoundChannelE channel, jbyte volume) {
|
|||
sp->len = sp->sound->len;
|
||||
sp->next = _jlSoundList;
|
||||
_jlSoundList = sp;
|
||||
_jlSoundsPlaying++;
|
||||
SDL_UnlockAudioDevice(_jlAudioDevice);
|
||||
}
|
||||
}
|
||||
|
@ -593,7 +587,6 @@ void jlSoundStop(jlSoundT *sound) {
|
|||
temp = cur;
|
||||
cur = cur->next;
|
||||
jlFree(temp);
|
||||
_jlSoundsPlaying--;
|
||||
} else {
|
||||
prev = cur;
|
||||
cur = cur->next;
|
||||
|
@ -716,8 +709,8 @@ void jlUtilTitleSet(char *title) {
|
|||
|
||||
int main(int argc, char *argv[]) {
|
||||
|
||||
int joysticks;
|
||||
int x;
|
||||
int joysticks;
|
||||
int x;
|
||||
|
||||
(void)argc;
|
||||
(void)argv;
|
||||
|
@ -738,7 +731,7 @@ int main(int argc, char *argv[]) {
|
|||
|
||||
// Create a window and renderer using SDL
|
||||
_jlWindow = SDL_CreateWindow("", SDL_WINDOWPOS_UNDEFINED, SDL_WINDOWPOS_UNDEFINED, (320 + BORDER_WIDTH * 2) * _jlWindowZoom, (200 + BORDER_WIDTH * 2) * _jlWindowZoom, SDL_WINDOW_SHOWN | SDL_WINDOW_RESIZABLE | SDL_WINDOW_ALLOW_HIGHDPI);
|
||||
_jlRenderer = SDL_CreateRenderer(_jlWindow, -1, SDL_RENDERER_SOFTWARE);
|
||||
_jlRenderer = SDL_CreateRenderer(_jlWindow, -1, SDL_RENDERER_ACCELERATED | SDL_RENDERER_PRESENTVSYNC);
|
||||
_jlTexture = SDL_CreateTexture(_jlRenderer, SDL_PIXELFORMAT_ARGB8888, SDL_TEXTUREACCESS_STREAMING, 320, 200);
|
||||
_jlPixelFormat = SDL_AllocFormat(SDL_GetWindowPixelFormat(_jlWindow));
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue