2015-08-30 18:04:52 +00:00
|
|
|
/* RetroArch - A frontend for libretro.
|
|
|
|
* Copyright (C) 2015 - Sergi Granell (xerpi)
|
|
|
|
*
|
|
|
|
* RetroArch is free software: you can redistribute it and/or modify it under the terms
|
|
|
|
* of the GNU General Public License as published by the Free Software Found-
|
|
|
|
* ation, either version 3 of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* RetroArch is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
|
|
|
|
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
|
|
|
* PURPOSE. See the GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License along with RetroArch.
|
|
|
|
* If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
*/
|
|
|
|
|
2015-08-30 22:55:34 +00:00
|
|
|
#include <retro_inline.h>
|
|
|
|
#include "../../defines/psp_defines.h"
|
2015-08-30 18:04:52 +00:00
|
|
|
#include "../../general.h"
|
|
|
|
#include "../../driver.h"
|
|
|
|
#include "../video_viewport.h"
|
2015-08-30 22:55:34 +00:00
|
|
|
#include "../video_monitor.h"
|
2015-08-30 18:04:52 +00:00
|
|
|
|
2015-08-30 18:11:57 +00:00
|
|
|
#include <vita2d.h>
|
|
|
|
|
2015-08-30 20:48:19 +00:00
|
|
|
#define SCREEN_W 960
|
|
|
|
#define SCREEN_H 544
|
|
|
|
|
2015-08-30 22:55:34 +00:00
|
|
|
typedef struct vita_menu_frame
|
|
|
|
{
|
|
|
|
bool active;
|
|
|
|
int width;
|
|
|
|
int height;
|
2015-09-02 16:56:24 +00:00
|
|
|
vita2d_texture *texture;
|
|
|
|
} vita_menu_t;
|
2015-08-30 22:55:34 +00:00
|
|
|
|
2015-08-30 20:48:19 +00:00
|
|
|
typedef struct vita_video
|
|
|
|
{
|
2015-08-30 22:55:34 +00:00
|
|
|
vita2d_texture *texture;
|
2015-08-31 13:26:37 +00:00
|
|
|
SceGxmTextureFormat format;
|
|
|
|
int width;
|
|
|
|
int height;
|
2015-08-30 20:48:19 +00:00
|
|
|
|
2015-08-31 17:37:02 +00:00
|
|
|
bool fullscreen;
|
2015-08-30 20:48:19 +00:00
|
|
|
bool vsync;
|
|
|
|
bool rgb32;
|
|
|
|
|
|
|
|
video_viewport_t vp;
|
|
|
|
|
|
|
|
unsigned rotation;
|
|
|
|
bool vblank_not_reached;
|
|
|
|
bool keep_aspect;
|
|
|
|
bool should_resize;
|
2015-08-30 22:55:34 +00:00
|
|
|
|
2015-09-02 16:56:24 +00:00
|
|
|
vita_menu_t menu;
|
2015-08-30 20:48:19 +00:00
|
|
|
} vita_video_t;
|
|
|
|
|
2015-08-30 18:04:52 +00:00
|
|
|
static void *vita2d_gfx_init(const video_info_t *video,
|
|
|
|
const input_driver_t **input, void **input_data)
|
|
|
|
{
|
2015-08-30 22:55:34 +00:00
|
|
|
void *pspinput = NULL;
|
2015-08-30 18:04:52 +00:00
|
|
|
*input = NULL;
|
|
|
|
*input_data = NULL;
|
|
|
|
(void)video;
|
|
|
|
|
2015-08-30 20:48:19 +00:00
|
|
|
vita_video_t *vita = (vita_video_t *)calloc(1, sizeof(vita_video_t));
|
|
|
|
|
|
|
|
if (!vita)
|
|
|
|
return NULL;
|
|
|
|
|
2015-08-31 23:35:29 +00:00
|
|
|
RARCH_LOG("vita2d_gfx_init: w: %i h: %i\n", video->width, video->height);
|
|
|
|
RARCH_LOG("RARCH_SCALE_BASE: %i input_scale: %i = %i\n",
|
|
|
|
RARCH_SCALE_BASE, video->input_scale, RARCH_SCALE_BASE * video->input_scale);
|
|
|
|
|
2015-08-31 13:26:37 +00:00
|
|
|
|
2015-08-30 18:04:52 +00:00
|
|
|
vita2d_init();
|
|
|
|
vita2d_set_clear_color(RGBA8(0x40, 0x40, 0x40, 0xFF));
|
2015-08-30 20:48:19 +00:00
|
|
|
vita2d_set_vblank_wait(video->vsync);
|
|
|
|
|
2015-08-30 22:55:34 +00:00
|
|
|
if (vita->rgb32)
|
2015-09-02 16:56:24 +00:00
|
|
|
{
|
|
|
|
RARCH_LOG("Format: SCE_GXM_TEXTURE_FORMAT_X8U8U8U8_1RGB\n");
|
2015-08-31 13:26:37 +00:00
|
|
|
vita->format = SCE_GXM_TEXTURE_FORMAT_X8U8U8U8_1RGB;
|
2015-09-02 16:56:24 +00:00
|
|
|
}
|
2015-08-30 22:55:34 +00:00
|
|
|
else
|
2015-09-02 16:56:24 +00:00
|
|
|
{
|
|
|
|
RARCH_LOG("Format: SCE_GXM_TEXTURE_FORMAT_R5G6B5\n");
|
2015-08-31 13:26:37 +00:00
|
|
|
vita->format = SCE_GXM_TEXTURE_FORMAT_R5G6B5;
|
2015-09-02 16:56:24 +00:00
|
|
|
}
|
2015-08-31 13:26:37 +00:00
|
|
|
|
2015-08-31 17:37:02 +00:00
|
|
|
vita->fullscreen = video->fullscreen;
|
2015-08-30 22:55:34 +00:00
|
|
|
|
2015-08-31 17:37:02 +00:00
|
|
|
vita->texture = NULL;
|
2015-09-02 16:56:24 +00:00
|
|
|
vita->menu.texture = NULL;
|
2015-08-30 22:55:34 +00:00
|
|
|
vita->menu.active = 0;
|
|
|
|
vita->menu.width = 0;
|
|
|
|
vita->menu.height = 0;
|
2015-08-30 18:04:52 +00:00
|
|
|
|
2015-08-30 20:48:19 +00:00
|
|
|
vita->vsync = video->vsync;
|
|
|
|
vita->rgb32 = video->rgb32;
|
|
|
|
|
2015-08-30 22:55:34 +00:00
|
|
|
if (input && input_data)
|
|
|
|
{
|
|
|
|
pspinput = input_psp.init();
|
|
|
|
*input = pspinput ? &input_psp : NULL;
|
|
|
|
*input_data = pspinput;
|
|
|
|
}
|
|
|
|
|
2015-08-30 20:48:19 +00:00
|
|
|
return vita;
|
2015-08-30 18:04:52 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
static bool vita2d_gfx_frame(void *data, const void *frame,
|
|
|
|
unsigned width, unsigned height, uint64_t frame_count,
|
|
|
|
unsigned pitch, const char *msg)
|
|
|
|
{
|
2015-08-31 13:26:37 +00:00
|
|
|
int i, j;
|
|
|
|
void *tex_p;
|
2015-09-02 16:56:24 +00:00
|
|
|
unsigned int stride;
|
2015-08-30 20:48:19 +00:00
|
|
|
vita_video_t *vita = (vita_video_t *)data;
|
2015-08-30 18:04:52 +00:00
|
|
|
(void)frame;
|
|
|
|
(void)width;
|
|
|
|
(void)height;
|
|
|
|
(void)pitch;
|
|
|
|
(void)msg;
|
|
|
|
|
2015-08-31 13:26:37 +00:00
|
|
|
if (frame)
|
|
|
|
{
|
|
|
|
if (width != vita->width && height != vita->height && vita->texture)
|
|
|
|
{
|
|
|
|
vita2d_free_texture(vita->texture);
|
|
|
|
vita->texture = NULL;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (!vita->texture)
|
|
|
|
{
|
2015-09-02 16:56:24 +00:00
|
|
|
RARCH_LOG("Creating texture: %ix%i\n", width, height);
|
2015-08-31 13:26:37 +00:00
|
|
|
vita->width = width;
|
|
|
|
vita->height = height;
|
|
|
|
vita->texture = vita2d_create_empty_texture_format(width, height, vita->format);
|
|
|
|
}
|
|
|
|
|
|
|
|
tex_p = vita2d_texture_get_datap(vita->texture);
|
2015-09-02 16:56:24 +00:00
|
|
|
stride = vita2d_texture_get_stride(vita->texture);
|
2015-08-31 13:26:37 +00:00
|
|
|
|
2015-09-02 16:56:24 +00:00
|
|
|
if (vita->format == SCE_GXM_TEXTURE_FORMAT_X8U8U8U8_1RGB)
|
2015-08-31 13:26:37 +00:00
|
|
|
{
|
2015-09-02 16:56:24 +00:00
|
|
|
stride /= 4;
|
|
|
|
pitch /= 4;
|
|
|
|
unsigned int *tex32 = tex_p;
|
|
|
|
const unsigned int *frame32 = frame;
|
2015-08-31 13:26:37 +00:00
|
|
|
for (i = 0; i < height; i++)
|
2015-09-02 16:56:24 +00:00
|
|
|
for (j = 0; j < width; j++)
|
|
|
|
tex32[j + i*stride] = frame32[j + i*pitch];
|
2015-08-31 13:26:37 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2015-09-02 16:56:24 +00:00
|
|
|
stride /= 2;
|
|
|
|
pitch /= 2;
|
|
|
|
unsigned short *tex16 = tex_p;
|
|
|
|
const unsigned short *frame16 = frame;
|
|
|
|
for (i = 0; i < height; i++)
|
|
|
|
for (j = 0; j < width; j++)
|
|
|
|
tex16[j + i*stride] = frame16[j + i*pitch];
|
2015-08-31 13:26:37 +00:00
|
|
|
}
|
|
|
|
}
|
2015-08-30 20:48:19 +00:00
|
|
|
|
2015-08-30 18:11:57 +00:00
|
|
|
vita2d_start_drawing();
|
|
|
|
vita2d_clear_screen();
|
|
|
|
|
2015-08-31 23:35:29 +00:00
|
|
|
if (vita->texture)
|
2015-08-31 17:37:02 +00:00
|
|
|
{
|
|
|
|
if (vita->fullscreen)
|
|
|
|
vita2d_draw_texture_scale(vita->texture,
|
|
|
|
0, 0,
|
|
|
|
SCREEN_W/(float)vita->width,
|
|
|
|
SCREEN_H/(float)vita->height);
|
|
|
|
else
|
|
|
|
if (vita->width > vita->height)
|
|
|
|
{
|
2015-08-31 19:37:50 +00:00
|
|
|
float scale = SCREEN_H/(float)vita->height;
|
|
|
|
float w = vita->width * scale;
|
2015-08-31 17:37:02 +00:00
|
|
|
vita2d_draw_texture_scale(vita->texture,
|
|
|
|
SCREEN_W/2.0f - w/2.0f, 0.0f,
|
|
|
|
scale, scale);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2015-08-31 19:37:50 +00:00
|
|
|
float scale = SCREEN_W/(float)vita->width;
|
|
|
|
float h = vita->height * scale;
|
2015-08-31 17:37:02 +00:00
|
|
|
vita2d_draw_texture_scale(vita->texture,
|
|
|
|
0.0f, SCREEN_H/2.0f - h/2.0f,
|
|
|
|
scale, scale);
|
|
|
|
}
|
|
|
|
}
|
2015-08-30 20:48:19 +00:00
|
|
|
|
2015-09-02 16:56:24 +00:00
|
|
|
if (vita->menu.active && vita->menu.texture)
|
2015-08-31 17:37:02 +00:00
|
|
|
{
|
|
|
|
if (vita->fullscreen)
|
2015-09-02 16:56:24 +00:00
|
|
|
vita2d_draw_texture_scale(vita->menu.texture,
|
2015-08-31 17:37:02 +00:00
|
|
|
0, 0,
|
|
|
|
SCREEN_W/(float)vita->menu.width,
|
|
|
|
SCREEN_H/(float)vita->menu.height);
|
|
|
|
else
|
|
|
|
if (vita->menu.width > vita->menu.height)
|
|
|
|
{
|
2015-08-31 19:37:50 +00:00
|
|
|
float scale = SCREEN_H/(float)vita->menu.height;
|
|
|
|
float w = vita->menu.width * scale;
|
2015-09-02 16:56:24 +00:00
|
|
|
vita2d_draw_texture_scale(vita->menu.texture,
|
2015-08-31 17:37:02 +00:00
|
|
|
SCREEN_W/2.0f - w/2.0f, 0.0f,
|
|
|
|
scale, scale);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2015-08-31 19:37:50 +00:00
|
|
|
float scale = SCREEN_W/(float)vita->menu.width;
|
|
|
|
float h = vita->menu.height * scale;
|
2015-09-02 16:56:24 +00:00
|
|
|
vita2d_draw_texture_scale(vita->menu.texture,
|
2015-08-31 17:37:02 +00:00
|
|
|
0.0f, SCREEN_H/2.0f - h/2.0f,
|
|
|
|
scale, scale);
|
|
|
|
}
|
|
|
|
}
|
2015-08-30 20:48:19 +00:00
|
|
|
|
2015-08-30 18:11:57 +00:00
|
|
|
vita2d_end_drawing();
|
|
|
|
vita2d_swap_buffers();
|
|
|
|
|
2015-08-30 18:04:52 +00:00
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
|
|
|
static void vita2d_gfx_set_nonblock_state(void *data, bool toggle)
|
|
|
|
{
|
2015-08-30 20:48:19 +00:00
|
|
|
vita_video_t *vita = (vita_video_t *)data;
|
|
|
|
|
|
|
|
if (vita)
|
|
|
|
{
|
|
|
|
vita->vsync = !toggle;
|
|
|
|
vita2d_set_vblank_wait(vita->vsync);
|
|
|
|
}
|
2015-08-30 18:04:52 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
static bool vita2d_gfx_alive(void *data)
|
|
|
|
{
|
|
|
|
(void)data;
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
|
|
|
static bool vita2d_gfx_focus(void *data)
|
|
|
|
{
|
|
|
|
(void)data;
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
|
|
|
static bool vita2d_gfx_suppress_screensaver(void *data, bool enable)
|
|
|
|
{
|
|
|
|
(void)data;
|
|
|
|
(void)enable;
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
|
|
|
static bool vita2d_gfx_has_windowed(void *data)
|
|
|
|
{
|
|
|
|
(void)data;
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
|
|
|
static void vita2d_gfx_free(void *data)
|
|
|
|
{
|
2015-08-30 20:48:19 +00:00
|
|
|
vita_video_t *vita = (vita_video_t *)data;
|
|
|
|
|
2015-08-31 23:35:29 +00:00
|
|
|
RARCH_LOG("vita2d_gfx_free()\n");
|
|
|
|
|
2015-09-02 16:56:24 +00:00
|
|
|
vita2d_fini();
|
|
|
|
|
|
|
|
if (vita->menu.texture)
|
2015-08-31 23:35:29 +00:00
|
|
|
{
|
2015-09-02 16:56:24 +00:00
|
|
|
vita2d_free_texture(vita->menu.texture);
|
|
|
|
vita->menu.texture = NULL;
|
2015-08-31 23:35:29 +00:00
|
|
|
}
|
2015-08-30 22:55:34 +00:00
|
|
|
|
2015-08-31 19:41:45 +00:00
|
|
|
if (vita->texture)
|
2015-08-31 23:35:29 +00:00
|
|
|
{
|
2015-08-31 19:41:45 +00:00
|
|
|
vita2d_free_texture(vita->texture);
|
2015-08-31 23:35:29 +00:00
|
|
|
vita->texture = NULL;
|
|
|
|
}
|
2015-08-30 18:04:52 +00:00
|
|
|
|
2015-09-02 16:56:24 +00:00
|
|
|
RARCH_LOG("vita2d_gfx_free() done\n");
|
2015-08-30 18:04:52 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
static bool vita2d_gfx_set_shader(void *data,
|
|
|
|
enum rarch_shader_type type, const char *path)
|
|
|
|
{
|
|
|
|
(void)data;
|
|
|
|
(void)type;
|
|
|
|
(void)path;
|
|
|
|
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
|
|
|
static void vita2d_gfx_set_rotation(void *data,
|
|
|
|
unsigned rotation)
|
|
|
|
{
|
|
|
|
(void)data;
|
|
|
|
(void)rotation;
|
|
|
|
}
|
|
|
|
|
|
|
|
static void vita2d_gfx_viewport_info(void *data,
|
|
|
|
struct video_viewport *vp)
|
|
|
|
{
|
|
|
|
(void)data;
|
|
|
|
(void)vp;
|
|
|
|
}
|
|
|
|
|
|
|
|
static bool vita2d_gfx_read_viewport(void *data, uint8_t *buffer)
|
|
|
|
{
|
|
|
|
(void)data;
|
|
|
|
(void)buffer;
|
|
|
|
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
2015-08-30 22:55:34 +00:00
|
|
|
static void vita_set_filtering(void *data, unsigned index, bool smooth)
|
|
|
|
{
|
2015-08-31 13:26:37 +00:00
|
|
|
(void)data;
|
|
|
|
(void)index;
|
|
|
|
(void)smooth;
|
2015-08-30 22:55:34 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
static void vita_set_aspect_ratio(void *data, unsigned aspectratio_index)
|
|
|
|
{
|
|
|
|
struct retro_system_av_info *av_info =
|
|
|
|
video_viewport_get_system_av_info();
|
|
|
|
|
|
|
|
switch (aspectratio_index)
|
|
|
|
{
|
|
|
|
case ASPECT_RATIO_SQUARE:
|
|
|
|
video_viewport_set_square_pixel(
|
|
|
|
av_info->geometry.base_width,
|
|
|
|
av_info->geometry.base_height);
|
|
|
|
break;
|
|
|
|
|
|
|
|
case ASPECT_RATIO_CORE:
|
|
|
|
video_viewport_set_core();
|
|
|
|
break;
|
|
|
|
|
|
|
|
case ASPECT_RATIO_CONFIG:
|
|
|
|
video_viewport_set_config();
|
|
|
|
break;
|
|
|
|
|
|
|
|
default:
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
|
|
|
video_driver_set_aspect_ratio_value(aspectratio_lut[aspectratio_index].value);
|
|
|
|
}
|
|
|
|
|
|
|
|
static void vita_apply_state_changes(void *data)
|
|
|
|
{
|
|
|
|
(void)data;
|
|
|
|
}
|
|
|
|
|
|
|
|
static void vita_set_texture_frame(void *data, const void *frame, bool rgb32,
|
|
|
|
unsigned width, unsigned height, float alpha)
|
|
|
|
{
|
|
|
|
int i, j;
|
|
|
|
void *tex_p;
|
2015-09-02 16:56:24 +00:00
|
|
|
unsigned int stride;
|
2015-08-30 22:55:34 +00:00
|
|
|
vita_video_t *vita = (vita_video_t*)data;
|
|
|
|
|
|
|
|
(void)alpha;
|
|
|
|
|
2015-09-02 16:56:24 +00:00
|
|
|
if (width != vita->menu.width && height != vita->menu.height && vita->menu.texture)
|
2015-08-30 22:55:34 +00:00
|
|
|
{
|
2015-09-02 16:56:24 +00:00
|
|
|
vita2d_free_texture(vita->menu.texture);
|
|
|
|
vita->menu.texture = NULL;
|
2015-08-30 22:55:34 +00:00
|
|
|
}
|
|
|
|
|
2015-09-02 16:56:24 +00:00
|
|
|
if (!vita->menu.texture)
|
2015-08-30 22:55:34 +00:00
|
|
|
{
|
|
|
|
if (rgb32)
|
|
|
|
{
|
2015-09-02 16:56:24 +00:00
|
|
|
vita->menu.texture = vita2d_create_empty_texture(width, height);
|
2015-08-30 22:55:34 +00:00
|
|
|
RARCH_LOG("Creating Frame RGBA8 texture: w: %i h: %i\n", width, height);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2015-09-02 16:56:24 +00:00
|
|
|
vita->menu.texture = vita2d_create_empty_texture_format(width, height, SCE_GXM_TEXTURE_FORMAT_U4U4U4U4_RGBA);
|
2015-08-30 22:55:34 +00:00
|
|
|
RARCH_LOG("Creating Frame R5G6B5 texture: w: %i h: %i\n", width, height);
|
|
|
|
}
|
|
|
|
vita->menu.width = width;
|
|
|
|
vita->menu.height = height;
|
|
|
|
}
|
|
|
|
|
2015-09-02 16:56:24 +00:00
|
|
|
tex_p = vita2d_texture_get_datap(vita->menu.texture);
|
|
|
|
stride = vita2d_texture_get_stride(vita->menu.texture);
|
2015-08-30 22:55:34 +00:00
|
|
|
|
|
|
|
if (rgb32)
|
|
|
|
{
|
2015-09-02 16:56:24 +00:00
|
|
|
stride /= 4;
|
|
|
|
unsigned int *tex32 = tex_p;
|
|
|
|
const unsigned int *frame32 = frame;
|
|
|
|
for (i = 0; i < height; i++)
|
|
|
|
for (j = 0; j < width; j++)
|
|
|
|
tex32[j + i*stride] = frame32[j + i*width];
|
2015-08-30 22:55:34 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2015-09-02 16:56:24 +00:00
|
|
|
stride /= 2;
|
|
|
|
unsigned short *tex16 = tex_p;
|
|
|
|
const unsigned short *frame16 = frame;
|
|
|
|
for (i = 0; i < height; i++)
|
|
|
|
for (j = 0; j < width; j++)
|
|
|
|
tex16[j + i*stride] = frame16[j + i*width];
|
2015-08-30 22:55:34 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
static void vita_set_texture_enable(void *data, bool state, bool full_screen)
|
|
|
|
{
|
2015-08-31 17:37:02 +00:00
|
|
|
vita_video_t *vita = (vita_video_t*)data;
|
2015-08-30 22:55:34 +00:00
|
|
|
(void)full_screen;
|
|
|
|
|
2015-08-31 17:37:02 +00:00
|
|
|
vita->menu.active = state;
|
2015-08-30 22:55:34 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
static const video_poke_interface_t vita_poke_interface = {
|
|
|
|
NULL,
|
|
|
|
vita_set_filtering,
|
|
|
|
NULL, /* get_video_output_size */
|
|
|
|
NULL, /* get_video_output_prev */
|
|
|
|
NULL, /* get_video_output_next */
|
|
|
|
NULL, /* get_current_framebuffer */
|
|
|
|
NULL, /* get_proc_address */
|
|
|
|
vita_set_aspect_ratio,
|
|
|
|
vita_apply_state_changes,
|
|
|
|
#ifdef HAVE_MENU
|
|
|
|
vita_set_texture_frame,
|
|
|
|
vita_set_texture_enable,
|
|
|
|
#endif
|
|
|
|
NULL,
|
|
|
|
NULL,
|
|
|
|
NULL
|
|
|
|
};
|
|
|
|
|
2015-08-30 18:04:52 +00:00
|
|
|
static void vita2d_gfx_get_poke_interface(void *data,
|
|
|
|
const video_poke_interface_t **iface)
|
|
|
|
{
|
|
|
|
(void)data;
|
2015-08-30 22:55:34 +00:00
|
|
|
*iface = &vita_poke_interface;
|
2015-08-30 18:04:52 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
video_driver_t video_vita2d = {
|
|
|
|
vita2d_gfx_init,
|
|
|
|
vita2d_gfx_frame,
|
|
|
|
vita2d_gfx_set_nonblock_state,
|
|
|
|
vita2d_gfx_alive,
|
|
|
|
vita2d_gfx_focus,
|
|
|
|
vita2d_gfx_suppress_screensaver,
|
|
|
|
vita2d_gfx_has_windowed,
|
|
|
|
vita2d_gfx_set_shader,
|
|
|
|
vita2d_gfx_free,
|
|
|
|
"vita2d",
|
|
|
|
NULL, /* set_viewport */
|
|
|
|
vita2d_gfx_set_rotation,
|
|
|
|
vita2d_gfx_viewport_info,
|
|
|
|
vita2d_gfx_read_viewport,
|
|
|
|
NULL, /* read_frame_raw */
|
|
|
|
|
|
|
|
#ifdef HAVE_OVERLAY
|
|
|
|
NULL, /* overlay_interface */
|
|
|
|
#endif
|
2015-08-31 13:26:37 +00:00
|
|
|
vita2d_gfx_get_poke_interface,
|
2015-08-30 18:04:52 +00:00
|
|
|
};
|