mirror of
https://github.com/libretro/RetroArch
synced 2025-02-03 17:54:04 +00:00
(360) Remove xdk360_video_general.h header file - use uniform
IS_TIMER/SET_TIMER macros
This commit is contained in:
parent
ca9b6ac0e2
commit
6e8e5ec89b
@ -804,7 +804,7 @@ void menu_loop(void)
|
||||
|
||||
g_console.menu_enable = !((state.Gamepad.wButtons & XINPUT_GAMEPAD_LEFT_THUMB)
|
||||
&& (state.Gamepad.wButtons & XINPUT_GAMEPAD_RIGHT_THUMB) && (g_console.emulator_initialized)
|
||||
&& IS_TIMER_EXPIRED());
|
||||
&& IS_TIMER_EXPIRED(d3d9));
|
||||
g_console.mode_switch = g_console.menu_enable ? MODE_MENU : MODE_EMULATION;
|
||||
|
||||
switch(g_console.input_loop)
|
||||
@ -826,7 +826,7 @@ void menu_loop(void)
|
||||
|
||||
if(g_console.mode_switch == MODE_EMULATION && !g_console.frame_advance_enable)
|
||||
{
|
||||
SET_TIMER_EXPIRATION(30);
|
||||
SET_TIMER_EXPIRATION(d3d9, 30);
|
||||
}
|
||||
|
||||
/* XBox 360 specific font code */
|
||||
@ -835,11 +835,11 @@ void menu_loop(void)
|
||||
|
||||
if (msg)
|
||||
{
|
||||
if(IS_TIMER_EXPIRED() || g_first_msg)
|
||||
if(IS_TIMER_EXPIRED(d3d9) || g_first_msg)
|
||||
{
|
||||
xdk360_console_format(msg);
|
||||
g_first_msg = 0;
|
||||
SET_TIMER_EXPIRATION(30);
|
||||
SET_TIMER_EXPIRATION(d3d9, 30);
|
||||
}
|
||||
|
||||
xdk360_console_draw();
|
||||
|
@ -20,9 +20,8 @@
|
||||
#include "../driver.h"
|
||||
#include "../general.h"
|
||||
#include "../libretro.h"
|
||||
#include "../console/console_ext_input.h"
|
||||
#include "../console/console_ext.h"
|
||||
#include "xdk360_input.h"
|
||||
#include "xdk360_video_general.h"
|
||||
#include "shared.h"
|
||||
#include "menu.h"
|
||||
|
||||
@ -178,18 +177,18 @@ static bool xdk360_key_pressed(void *data, int key)
|
||||
case RARCH_REWIND:
|
||||
return ((state.Gamepad.sThumbRY > DEADZONE) && !(state.Gamepad.bRightTrigger > 128));
|
||||
case RARCH_QUIT_KEY:
|
||||
if(IS_TIMER_EXPIRED())
|
||||
if(IS_TIMER_EXPIRED(d3d9))
|
||||
{
|
||||
uint32_t left_thumb_pressed = (state.Gamepad.wButtons & XINPUT_GAMEPAD_LEFT_THUMB);
|
||||
uint32_t right_thumb_pressed = (state.Gamepad.wButtons & XINPUT_GAMEPAD_RIGHT_THUMB);
|
||||
|
||||
g_console.menu_enable = right_thumb_pressed && left_thumb_pressed && IS_TIMER_EXPIRED();
|
||||
g_console.menu_enable = right_thumb_pressed && left_thumb_pressed && IS_TIMER_EXPIRED(d3d9);
|
||||
g_console.ingame_menu_enable = right_thumb_pressed && !left_thumb_pressed;
|
||||
|
||||
if(g_console.menu_enable || (g_console.ingame_menu_enable && !g_console.menu_enable))
|
||||
{
|
||||
g_console.mode_switch = MODE_MENU;
|
||||
SET_TIMER_EXPIRATION(30);
|
||||
SET_TIMER_EXPIRATION(d3d9, 30);
|
||||
retval = g_console.menu_enable;
|
||||
}
|
||||
|
||||
|
@ -669,11 +669,11 @@ static bool xdk360_frame(void *data, const void *frame,
|
||||
/* XBox 360 specific font code */
|
||||
if (msg && !menu_enabled)
|
||||
{
|
||||
if(IS_TIMER_EXPIRED() || g_first_msg)
|
||||
if(IS_TIMER_EXPIRED(d3d9) || g_first_msg)
|
||||
{
|
||||
xdk360_console_format(msg);
|
||||
g_first_msg = 0;
|
||||
SET_TIMER_EXPIRATION(30);
|
||||
SET_TIMER_EXPIRATION(d3d9, 30);
|
||||
}
|
||||
|
||||
xdk360_console_draw();
|
||||
|
@ -19,7 +19,6 @@
|
||||
|
||||
#include <stdint.h>
|
||||
#include "fonts.h"
|
||||
#include "xdk360_video_general.h"
|
||||
|
||||
#define DFONT_MAX 4096
|
||||
#define PRIM_FVF (D3DFVF_XYZRHW | D3DFVF_TEX1)
|
||||
|
@ -1,26 +0,0 @@
|
||||
/* RetroArch - A frontend for libretro.
|
||||
* Copyright (C) 2010-2012 - Hans-Kristian Arntzen
|
||||
* Copyright (C) 2011-2012 - Daniel De Matteis
|
||||
*
|
||||
* 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 _XDK360_VIDEO_GENERAL_H
|
||||
#define _XDK360_VIDEO_GENERAL_H
|
||||
|
||||
#define LAST_ASPECT_RATIO ASPECT_RATIO_CUSTOM
|
||||
|
||||
#define IS_TIMER_NOT_EXPIRED() (d3d9->frame_count < g_console.timer_expiration_frame_count)
|
||||
#define IS_TIMER_EXPIRED() (!(IS_TIMER_NOT_EXPIRED()))
|
||||
#define SET_TIMER_EXPIRATION(value) g_console.timer_expiration_frame_count = d3d9->frame_count + value;
|
||||
|
||||
#endif
|
@ -17,6 +17,10 @@
|
||||
#ifndef CONSOLE_EXT_H__
|
||||
#define CONSOLE_EXT_H__
|
||||
|
||||
#define IS_TIMER_NOT_EXPIRED(handle) (handle->frame_count < g_console.timer_expiration_frame_count)
|
||||
#define IS_TIMER_EXPIRED(handle) (!(IS_TIMER_NOT_EXPIRED(handle)))
|
||||
#define SET_TIMER_EXPIRATION(handle, value) (g_console.timer_expiration_frame_count = handle->frame_count + value)
|
||||
|
||||
enum aspect_ratio
|
||||
{
|
||||
ASPECT_RATIO_1_1 = 0,
|
||||
@ -44,6 +48,8 @@ enum aspect_ratio
|
||||
ASPECT_RATIO_END,
|
||||
};
|
||||
|
||||
#define LAST_ASPECT_RATIO ASPECT_RATIO_CUSTOM
|
||||
|
||||
enum rotation
|
||||
{
|
||||
ORIENTATION_NORMAL = 0,
|
||||
|
Loading…
x
Reference in New Issue
Block a user