2012-10-26 19:09:30 +00:00
|
|
|
/* RetroArch - A frontend for libretro.
|
2014-01-01 00:50:59 +00:00
|
|
|
* Copyright (C) 2010-2014 - Hans-Kristian Arntzen
|
2017-01-22 12:40:32 +00:00
|
|
|
* Copyright (C) 2011-2017 - Daniel De Matteis
|
2012-10-26 19:09:30 +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/>.
|
|
|
|
*/
|
|
|
|
|
2015-01-07 21:23:45 +00:00
|
|
|
#ifndef __D3DVIDEO_INTF_H__
|
|
|
|
#define __D3DVIDEO_INTF_H__
|
2012-10-26 19:09:30 +00:00
|
|
|
|
2014-01-01 15:51:40 +00:00
|
|
|
#ifdef HAVE_CONFIG_H
|
|
|
|
#include "../../config.h"
|
|
|
|
#endif
|
|
|
|
|
2014-01-09 19:04:18 +00:00
|
|
|
#ifndef _XBOX
|
|
|
|
#define HAVE_WINDOW
|
|
|
|
#endif
|
|
|
|
|
2015-11-17 07:20:10 +00:00
|
|
|
#include "../../defines/d3d_defines.h"
|
2015-04-26 14:46:56 +00:00
|
|
|
|
2014-09-11 18:59:52 +00:00
|
|
|
#ifdef _XBOX1
|
|
|
|
#include <xfont.h>
|
|
|
|
#endif
|
|
|
|
|
2012-10-26 19:09:30 +00:00
|
|
|
#include "../../driver.h"
|
2014-09-11 22:18:18 +00:00
|
|
|
|
2015-04-03 18:36:19 +00:00
|
|
|
#include "../font_driver.h"
|
2017-05-08 23:25:59 +00:00
|
|
|
#include "../video_driver.h"
|
2015-11-18 12:00:13 +00:00
|
|
|
#include "../common/d3d_common.h"
|
2015-11-17 10:09:32 +00:00
|
|
|
#ifdef _XBOX
|
|
|
|
#include "../../defines/xdk_defines.h"
|
|
|
|
#endif
|
2014-10-24 22:12:23 +00:00
|
|
|
|
2013-04-07 17:34:44 +00:00
|
|
|
typedef struct
|
|
|
|
{
|
|
|
|
bool fullscreen;
|
2013-10-21 11:26:23 +00:00
|
|
|
bool enabled;
|
2017-09-08 23:35:15 +00:00
|
|
|
unsigned tex_w, tex_h;
|
|
|
|
float tex_coords[4];
|
|
|
|
float vert_coords[4];
|
2013-04-07 17:34:44 +00:00
|
|
|
float alpha_mod;
|
2013-12-31 23:27:55 +00:00
|
|
|
LPDIRECT3DTEXTURE tex;
|
2016-10-20 03:00:20 +00:00
|
|
|
void *vert_buf;
|
2015-04-06 18:47:29 +00:00
|
|
|
} overlay_t;
|
2013-04-07 17:34:44 +00:00
|
|
|
|
2014-09-11 18:31:37 +00:00
|
|
|
typedef struct Vertex
|
|
|
|
{
|
|
|
|
float x, y;
|
2017-09-05 01:21:58 +00:00
|
|
|
#if defined(HAVE_D3D8)
|
2014-09-11 18:31:37 +00:00
|
|
|
float z;
|
|
|
|
float rhw;
|
|
|
|
#endif
|
|
|
|
float u, v;
|
|
|
|
} Vertex;
|
|
|
|
|
2014-03-07 18:34:17 +00:00
|
|
|
typedef struct d3d_video
|
2012-10-26 19:09:30 +00:00
|
|
|
{
|
2015-11-10 04:30:25 +00:00
|
|
|
bool keep_aspect;
|
2015-04-11 19:54:52 +00:00
|
|
|
bool should_resize;
|
|
|
|
bool quitting;
|
2017-09-08 23:35:15 +00:00
|
|
|
bool needs_restore;
|
|
|
|
#ifdef HAVE_OVERLAY
|
|
|
|
bool overlays_enabled;
|
|
|
|
#endif
|
|
|
|
/* TODO - refactor this away properly. */
|
|
|
|
bool resolution_hd_enable;
|
2012-10-26 19:09:30 +00:00
|
|
|
|
2015-04-11 19:54:52 +00:00
|
|
|
unsigned cur_mon_id;
|
|
|
|
unsigned dev_rotation;
|
2012-10-26 19:09:30 +00:00
|
|
|
|
2017-09-08 23:35:15 +00:00
|
|
|
#if defined(HAVE_MENU)
|
|
|
|
overlay_t *menu;
|
|
|
|
#endif
|
|
|
|
const d3d_renderchain_driver_t *renderchain_driver;
|
|
|
|
void *renderchain_data;
|
2012-10-26 19:09:30 +00:00
|
|
|
|
2015-04-11 19:54:52 +00:00
|
|
|
RECT font_rect;
|
|
|
|
RECT font_rect_shifted;
|
2012-10-26 19:09:30 +00:00
|
|
|
|
2017-09-08 23:35:15 +00:00
|
|
|
struct video_viewport vp;
|
|
|
|
struct video_shader shader;
|
|
|
|
video_info_t video_info;
|
|
|
|
WNDCLASSEX windowClass;
|
|
|
|
LPDIRECT3DDEVICE dev;
|
|
|
|
D3DVIEWPORT final_viewport;
|
|
|
|
|
2017-10-01 23:38:06 +00:00
|
|
|
char *shader_path;
|
2017-09-08 23:35:15 +00:00
|
|
|
|
2013-03-27 14:55:59 +00:00
|
|
|
#ifdef HAVE_OVERLAY
|
2017-10-02 04:12:33 +00:00
|
|
|
size_t overlays_size;
|
|
|
|
overlay_t *overlays;
|
2013-04-07 17:34:44 +00:00
|
|
|
#endif
|
2014-03-07 18:34:17 +00:00
|
|
|
} d3d_video_t;
|
2012-10-26 19:09:30 +00:00
|
|
|
|
2015-04-11 19:56:38 +00:00
|
|
|
void d3d_make_d3dpp(void *data,
|
|
|
|
const video_info_t *info, D3DPRESENT_PARAMETERS *d3dpp);
|
|
|
|
|
2012-10-26 19:09:30 +00:00
|
|
|
#endif
|
|
|
|
|