Skip to content

Commit

Permalink
Vita: minor changes
Browse files Browse the repository at this point in the history
  • Loading branch information
usineur committed Nov 16, 2017
1 parent 90c583c commit 606cc3f
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 7 deletions.
12 changes: 6 additions & 6 deletions systemstub_sdl.cpp
Expand Up @@ -74,18 +74,18 @@ typedef struct SDL_Texture
int modMode; /**< The texture modulation mode */
SDL_BlendMode blendMode; /**< The texture blend mode */
Uint8 r, g, b, a; /**< Texture modulation values */

SDL_Renderer *renderer;

/* Support for formats not supported directly by the renderer */
SDL_Texture *native;
SDL_SW_YUVTexture *yuv;
void *pixels;
int pitch;
SDL_Rect locked_rect;

void *driverdata; /**< Driver specific texture representation */

SDL_Texture *prev;
SDL_Texture *next;
} SDL_Texture;
Expand Down Expand Up @@ -194,8 +194,8 @@ void SystemStub_SDL::init(const char *title, int w, int h) {
_gameTexture = SDL_CreateTexture(_renderer, pfmt, SDL_TEXTUREACCESS_STREAMING, _screenW, _screenH);
_fmt = SDL_AllocFormat(pfmt);
#ifdef BERMUDA_VITA
if (_gameTexture!=NULL) {
VITA_TextureData *sdl_hwtex=(VITA_TextureData *) _gameTexture->native->driverdata;
if (_gameTexture != NULL) {
VITA_TextureData *sdl_hwtex = (VITA_TextureData *)_gameTexture->native->driverdata;
vita2d_texture_set_filters(sdl_hwtex->tex, SCE_GXM_TEXTURE_FILTER_POINT, SCE_GXM_TEXTURE_FILTER_LINEAR);
}
_joystick = SDL_JoystickOpen(0);
Expand Down
7 changes: 6 additions & 1 deletion util.cpp
Expand Up @@ -6,6 +6,12 @@
#include <cstdarg>
#include "util.h"

#ifdef BERMUDA_VITA
#include <psp2/kernel/clib.h>
#define printf sceClibPrintf
#define fprintf(stderr, ...) sceClibPrintf(__VA_ARGS__)
#endif

uint16_t g_debugMask;

void debug(uint16_t cm, const char *msg, ...) {
Expand Down Expand Up @@ -39,5 +45,4 @@ void warning(const char *msg, ...) {
va_end(va);
fprintf(stderr, "WARNING: %s!\n", buf);
fflush(stderr);

}

0 comments on commit 606cc3f

Please sign in to comment.