From ea6119c1c75fd57558ee0497eb6d26c8ff2e4040 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Mon, 14 Sep 2015 03:50:34 +0200 Subject: [PATCH] (Vita) Add forward declaration for scePowerSetArmClockFrequency --- frontend/drivers/platform_psp.c | 2 ++ gfx/drivers/vita2d_gfx.c | 22 +++++++++++++--------- 2 files changed, 15 insertions(+), 9 deletions(-) diff --git a/frontend/drivers/platform_psp.c b/frontend/drivers/platform_psp.c index 7e797d9e5d..45eb218cb9 100644 --- a/frontend/drivers/platform_psp.c +++ b/frontend/drivers/platform_psp.c @@ -22,6 +22,8 @@ #ifdef VITA #include #include + +int scePowerSetArmClockFrequency(int freq); #else #include #include diff --git a/gfx/drivers/vita2d_gfx.c b/gfx/drivers/vita2d_gfx.c index 752b5da8c8..153dceace4 100644 --- a/gfx/drivers/vita2d_gfx.c +++ b/gfx/drivers/vita2d_gfx.c @@ -13,15 +13,16 @@ * If not, see . */ +#include + #include + #include "../../defines/psp_defines.h" #include "../../general.h" #include "../../driver.h" #include "../video_viewport.h" #include "../video_monitor.h" -#include - typedef struct vita_menu_frame { bool active; @@ -418,12 +419,13 @@ static bool vita2d_gfx_read_viewport(void *data, uint8_t *buffer) static void vita_set_filtering(void *data, unsigned index, bool smooth) { - vita_video_t *vita = (vita_video_t *)data; + vita_video_t *vita = (vita_video_t *)data; - if (vita){ - vita->tex_filter = smooth? SCE_GXM_TEXTURE_FILTER_LINEAR : SCE_GXM_TEXTURE_FILTER_POINT; - vita2d_texture_set_texture_filter(vita->texture,vita->tex_filter); - } + if (vita) + { + vita->tex_filter = smooth? SCE_GXM_TEXTURE_FILTER_LINEAR : SCE_GXM_TEXTURE_FILTER_POINT; + vita2d_texture_set_texture_filter(vita->texture,vita->tex_filter); + } } static void vita_set_aspect_ratio(void *data, unsigned aspectratio_index) @@ -503,20 +505,22 @@ static void vita_set_texture_frame(void *data, const void *frame, bool rgb32, if (rgb32) { - stride /= 4; uint32_t *tex32 = tex_p; const uint32_t *frame32 = frame; + stride /= 4; + for (i = 0; i < height; i++) for (j = 0; j < width; j++) tex32[j + i*stride] = frame32[j + i*width]; } else { - stride /= 2; uint16_t *tex16 = tex_p; const uint16_t *frame16 = frame; + stride /= 2; + for (i = 0; i < height; i++) for (j = 0; j < width; j++) tex16[j + i*stride] = frame16[j + i*width];