render/wiiu: Fix compiler warnings

This commit is contained in:
rw-r-r-0644
2019-03-10 00:53:02 +01:00
committed by Ash Logan
parent 7a02c03542
commit ceb9f1c096
4 changed files with 9 additions and 2 deletions

View File

@@ -37,6 +37,7 @@
#include <gx2/clear.h>
#include <gx2/mem.h>
#include <gx2/event.h>
#include <gx2r/surface.h>
#include <gx2r/buffer.h>
#include <gx2r/draw.h>

View File

@@ -189,7 +189,6 @@ void WIIU_SDL_DestroyRenderer(SDL_Renderer * renderer)
int WIIU_SDL_RenderReadPixels(SDL_Renderer * renderer, const SDL_Rect * rect,
Uint32 format, void * pixels, int pitch)
{
WIIU_RenderData *data = (WIIU_RenderData *) renderer->driverdata;
SDL_Texture* target = WIIU_GetRenderTarget(renderer);
WIIU_TextureData* tdata = (WIIU_TextureData*) target->driverdata;

View File

@@ -9,8 +9,9 @@
#include "SDL_render_wiiu.h"
#include <whb/gfx.h>
#include <gx2/draw.h>
#include <gx2/registers.h>
#include <gx2/state.h>
#include <gx2/draw.h>
#include <gx2r/buffer.h>
#include <gx2r/draw.h>

View File

@@ -188,17 +188,23 @@ int WIIU_SDL_UpdateTexture(SDL_Renderer * renderer, SDL_Texture * texture,
int WIIU_SDL_SetTextureColorMod(SDL_Renderer * renderer, SDL_Texture * texture)
{
WIIU_TextureData *tdata = (WIIU_TextureData *) texture->driverdata;
/* Compute color mod */
tdata->u_mod.r = (float)texture->r / 255.0f;
tdata->u_mod.g = (float)texture->g / 255.0f;
tdata->u_mod.b = (float)texture->b / 255.0f;
return 0;
}
int WIIU_SDL_SetTextureAlphaMod(SDL_Renderer * renderer, SDL_Texture * texture)
{
WIIU_TextureData *tdata = (WIIU_TextureData *) texture->driverdata;
/* Compute alpha mod */
tdata->u_mod.a = (float)texture->a / 255.0f;
return 0;
}
void WIIU_SDL_DestroyTexture(SDL_Renderer * renderer, SDL_Texture * texture)