RetroArch/gfx/common/vita2d_common.h

90 lines
2.0 KiB
C
Raw Normal View History

2016-08-23 00:49:53 +00:00
/* RetroArch - A frontend for libretro.
* Copyright (C) 2010-2014 - Hans-Kristian Arntzen
2017-01-22 12:40:32 +00:00
* Copyright (C) 2011-2017 - Daniel De Matteis
*
2016-08-23 00:49:53 +00:00
* 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/>.
*/
#ifndef VITA2D_COMMON_H__
#define VITA2D_COMMON_H__
#include <vita2d.h>
#include <retro_inline.h>
#include <string/stdstring.h>
2017-01-17 17:12:23 +00:00
#include <gfx/math/matrix_4x4.h>
2016-08-23 00:49:53 +00:00
#include "../../defines/psp_defines.h"
#include "../../driver.h"
2017-01-17 17:12:23 +00:00
#include "../video_driver.h"
2016-08-23 00:49:53 +00:00
#include "../video_coord_array.h"
typedef struct vita_menu_frame
{
bool active;
int width;
int height;
vita2d_texture *texture;
} vita_menu_t;
#ifdef HAVE_OVERLAY
struct vita_overlay_data
{
vita2d_texture *tex;
float x;
float y;
float w;
2016-08-23 00:49:53 +00:00
float h;
float tex_x;
float tex_y;
float tex_w;
2016-08-23 00:49:53 +00:00
float tex_h;
float alpha_mod;
float width;
float height;
};
#endif
typedef struct vita_video
{
vita2d_texture *texture;
SceGxmTextureFormat format;
int width;
int height;
SceGxmTextureFilter tex_filter;
bool fullscreen;
bool vsync;
bool rgb32;
video_viewport_t vp;
unsigned rotation;
math_matrix_4x4 mvp, mvp_no_rot;
bool vblank_not_reached;
bool keep_aspect;
bool should_resize;
vita_menu_t menu;
2016-08-23 00:49:53 +00:00
#ifdef HAVE_OVERLAY
struct vita_overlay_data *overlay;
unsigned overlays;
bool overlay_enable;
bool overlay_full_screen;
#endif
2016-08-23 00:49:53 +00:00
} vita_video_t;
#endif