Updated Direct3D to Spacy's 1.8 beta build

Added new code to disable backbuffer locking to enable proper Vsync
Enabled triple buffering for Direct3D
Removed some unneeded binary VS.NET files
This commit is contained in:
DJRobX 2007-11-01 10:28:09 +00:00
parent cb3bac591d
commit 5659db8a9a
9 changed files with 1429 additions and 1336 deletions

BIN
VBA.suo

Binary file not shown.

View File

@ -1642,6 +1642,10 @@
>
</File>
</Filter>
<File
RelativePath=".\res\VBA.manifest"
>
</File>
</Files>
<Globals>
<Global

Binary file not shown.

View File

@ -71,8 +71,8 @@ END
// Dialog
//
IDD_LINKTAB DIALOG DISCARDABLE 0, 0, 225, 162
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
IDD_LINKTAB DIALOG 0, 0, 225, 162
STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Link Options"
FONT 8, "MS Sans Serif"
BEGIN
@ -81,72 +81,59 @@ BEGIN
PUSHBUTTON "Cancel",ID_CANCEL,114,140,57,15
END
IDD_LINKTAB1 DIALOG DISCARDABLE 0, 0, 210, 130
STYLE WS_CHILD | WS_VISIBLE
IDD_LINKTAB1 DIALOG 0, 0, 210, 130
STYLE DS_SETFONT | WS_CHILD | WS_VISIBLE
FONT 8, "MS Sans Serif"
BEGIN
LTEXT "Link timeout (in milliseconds)",IDC_STATIC,17,12,92,16
EDITTEXT IDC_LINKTIMEOUT,116,10,53,14,ES_AUTOHSCROLL | ES_NUMBER
CONTROL "Single Computer",IDC_LINK_SINGLE,"Button",
BS_AUTORADIOBUTTON,17,27,71,16
CONTROL "Network",IDC_LINK_LAN,"Button",BS_AUTORADIOBUTTON,17,43,
70,16
CONTROL "Single Computer",IDC_LINK_SINGLE,"Button",BS_AUTORADIOBUTTON,17,27,71,16
CONTROL "Network",IDC_LINK_LAN,"Button",BS_AUTORADIOBUTTON,17,43,70,16
END
IDD_LINKTAB2 DIALOG DISCARDABLE 0, 0, 210, 113
STYLE WS_CHILD
IDD_LINKTAB2 DIALOG 0, 0, 210, 113
STYLE DS_SETFONT | WS_CHILD
FONT 8, "MS Sans Serif"
BEGIN
CONTROL "2",IDC_LINK2P,"Button",BS_AUTORADIOBUTTON | WS_GROUP,46,
16,21,13
CONTROL "2",IDC_LINK2P,"Button",BS_AUTORADIOBUTTON | WS_GROUP,46,16,21,13
CONTROL "3",IDC_LINK3P,"Button",BS_AUTORADIOBUTTON,94,16,21,13
CONTROL "4",IDC_LINK4P,"Button",BS_AUTORADIOBUTTON,142,16,21,13
CONTROL "TCP/IP",IDC_LINKTCP,"Button",BS_AUTORADIOBUTTON |
WS_GROUP,54,47,42,14
CONTROL "UDP",IDC_LINKUDP,"Button",BS_AUTORADIOBUTTON |
WS_DISABLED,121,47,33,14
CONTROL "TCP/IP",IDC_LINKTCP,"Button",BS_AUTORADIOBUTTON | WS_GROUP,54,47,42,14
CONTROL "UDP",IDC_LINKUDP,"Button",BS_AUTORADIOBUTTON | WS_DISABLED,121,47,33,14
PUSHBUTTON "Start!",IDC_SERVERSTART,79,89,50,17
LTEXT "Select number of players:",IDC_STATIC,60,7,89,10
LTEXT "Select protocol:",IDC_STATIC,78,33,53,11
CONTROL "Speed hacks",IDC_SSPEED,"Button",BS_AUTOCHECKBOX |
WS_TABSTOP,76,70,57,12
CONTROL "Speed hacks",IDC_SSPEED,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,76,70,57,12
END
IDD_LINKTAB3 DIALOG DISCARDABLE 0, 0, 210, 108
STYLE WS_CHILD
IDD_LINKTAB3 DIALOG 0, 0, 210, 108
STYLE DS_SETFONT | WS_CHILD
FONT 8, "MS Sans Serif"
BEGIN
CONTROL "TCP/IP",IDC_CLINKTCP,"Button",BS_AUTORADIOBUTTON |
WS_GROUP,58,20,39,12
CONTROL "UDP",IDC_CLINKUDP,"Button",BS_AUTORADIOBUTTON |
WS_DISABLED,118,20,32,12
CONTROL "TCP/IP",IDC_CLINKTCP,"Button",BS_AUTORADIOBUTTON | WS_GROUP,58,20,39,12
CONTROL "UDP",IDC_CLINKUDP,"Button",BS_AUTORADIOBUTTON | WS_DISABLED,118,20,32,12
EDITTEXT IDC_SERVERIP,84,39,79,12,ES_AUTOHSCROLL | WS_GROUP
PUSHBUTTON "Connect",IDC_LINKCONNECT,75,81,59,16
LTEXT "Select protocol:",IDC_STATIC,78,7,53,9
LTEXT "Server IP address or hostname:",IDC_STATIC,7,37,62,18
LTEXT "Speed hacks:",IDC_STATIC,7,64,47,10
CONTROL "Off (accurate)",IDC_SPEEDOFF,"Button",
BS_AUTORADIOBUTTON | WS_GROUP,60,63,57,12
CONTROL "On (fast)",IDC_SPEEDON,"Button",BS_AUTORADIOBUTTON,128,
63,48,12
CONTROL "Off (accurate)",IDC_SPEEDOFF,"Button",BS_AUTORADIOBUTTON | WS_GROUP,60,63,57,12
CONTROL "On (fast)",IDC_SPEEDON,"Button",BS_AUTORADIOBUTTON,128,63,48,12
END
IDD_SERVERWAIT DIALOG DISCARDABLE 0, 0, 186, 90
STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
IDD_SERVERWAIT DIALOG 0, 0, 186, 90
STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
CAPTION "Waiting for players"
FONT 8, "MS Sans Serif"
BEGIN
PUSHBUTTON "Cancel",IDCANCEL,63,69,50,14
CONTROL "Progress1",IDC_SERVERWAIT,"msctls_progress32",WS_BORDER,
33,50,120,13
CONTROL "Progress1",IDC_SERVERWAIT,"msctls_progress32",WS_BORDER,33,50,120,13
LTEXT "",IDC_STATIC1,7,7,154,8
LTEXT "",IDC_STATIC2,7,17,105,8
LTEXT "",IDC_STATIC3,7,25,105,8
LTEXT "",IDC_STATIC4,7,33,105,8
END
IDD_OPENDLG DIALOG 36, 24, 202, 117
STYLE DS_SETFONT | DS_MODALFRAME | DS_3DLOOK | DS_CONTEXTHELP | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Open"
@ -1563,7 +1550,6 @@ BEGIN
MENUITEM "Direct&Draw", ID_OPTIONS_VIDEO_RENDERMETHOD_DIRECTDRAW
MENUITEM " Emulation only", ID_OPTIONS_VIDEO_DDRAWEMULATIONONLY
MENUITEM " Use &Video Memory", ID_OPTIONS_VIDEO_DDRAWUSEVIDEOMEMORY
MENUITEM " Triple Buffering", ID_OPTIONS_VIDEO_TRIPLEBUFFERING
MENUITEM SEPARATOR
MENUITEM "Direct&3D", ID_OPTIONS_VIDEO_RENDERMETHOD_DIRECT3D
MENUITEM " Filter: Nearest", ID_OPTIONS_VIDEO_RENDEROPTIONS_D3DNOFILTER
@ -1576,6 +1562,7 @@ BEGIN
MENUITEM " Vertex: Quads", ID_OPTIONS_VIDEO_RENDEROPTIONS_GLQUADS
MENUITEM SEPARATOR
MENUITEM "&VSync", ID_OPTIONS_VIDEO_VSYNC
MENUITEM "Triple Buffering", ID_OPTIONS_VIDEO_TRIPLEBUFFERING
END
MENUITEM SEPARATOR
POPUP "Windowed"
@ -1809,7 +1796,7 @@ BEGIN
MENUITEM "&Real Colors", ID_OPTIONS_GAMEBOY_REALCOLORS
MENUITEM "G&ameboy Colors", ID_OPTIONS_GAMEBOY_GAMEBOYCOLORS
MENUITEM "LCD colors", ID_OPTIONS_FILTER_LCDCOLORS
MENUITEM SEPARATOR
MENUITEM SEPARATOR
MENUITEM "&Colors...", ID_OPTIONS_GAMEBOY_COLORS
END
POPUP "&Language"
@ -1821,7 +1808,6 @@ BEGIN
POPUP "Li&nk"
BEGIN
MENUITEM "&Wireless Adapter", ID_OPTIONS_LINK_WIRELESSADAPTER
MENUITEM "&Log", ID_OPTIONS_LINK_LOG
MENUITEM "&Options...", ID_OPTIONS_LINK_OPTIONS
END
@ -1960,13 +1946,6 @@ BEGIN
END
/////////////////////////////////////////////////////////////////////////////
//
// RT_MANIFEST
//
1 RT_MANIFEST "VBA.manifest"
/////////////////////////////////////////////////////////////////////////////
//
// Version

File diff suppressed because it is too large Load Diff

View File

@ -1,28 +1,28 @@
// -*- C++ -*-
// VisualBoyAdvance - Nintendo Gameboy/GameboyAdvance (TM) emulator.
// Copyright (C) 1999-2003 Forgotten
// Copyright (C) 2004 Forgotten and the VBA development team
// This program 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 Foundation; either version 2, or(at your option)
// any later version.
//
// This program 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 this program; if not, write to the Free Software Foundation,
// Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#ifndef VBA_WIN32_INPUT_H
#define VBA_WIN32_INPUT_H
#include "../System.h"
#define JOYCONFIG_MESSAGE (WM_USER + 1000)
// -*- C++ -*-
// VisualBoyAdvance - Nintendo Gameboy/GameboyAdvance (TM) emulator.
// Copyright (C) 1999-2003 Forgotten
// Copyright (C) 2004 Forgotten and the VBA development team
// This program 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 Foundation; either version 2, or(at your option)
// any later version.
//
// This program 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 this program; if not, write to the Free Software Foundation,
// Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#ifndef VBA_WIN32_INPUT_H
#define VBA_WIN32_INPUT_H
#include "../System.h"
#define JOYCONFIG_MESSAGE (WM_USER + 1000)
typedef CList<USHORT,USHORT> KeyList;
#define JOYPADS 4
@ -32,38 +32,38 @@ typedef CList<USHORT,USHORT> KeyList;
#define JOYPAD(i,j) ((i*KEYS_PER_PAD)+j)
#define DEVICEOF(key) (key >> 8)
#define KEYOF(key) (key & 255)
enum {
KEY_LEFT, KEY_RIGHT,
KEY_UP, KEY_DOWN,
KEY_BUTTON_A, KEY_BUTTON_B,
KEY_BUTTON_START, KEY_BUTTON_SELECT,
KEY_BUTTON_L, KEY_BUTTON_R,
KEY_BUTTON_SPEED, KEY_BUTTON_CAPTURE,
KEY_BUTTON_GS
};
class Input {
public:
KeyList joypaddata[JOYPADS * KEYS_PER_PAD + MOTION_KEYS];
Input() {};
virtual ~Input() {};
virtual bool initialize() = 0;
virtual bool readDevices() = 0;
virtual u32 readDevice(int which) = 0;
virtual CString getKeyName(int key) = 0;
virtual void checkKeys() = 0;
virtual void checkMotionKeys() = 0;
virtual void checkDevices() = 0;
virtual void activate() = 0;
virtual void loadSettings() = 0;
virtual void saveSettings() = 0;
};
#define joypad theApp.input->joypaddata
#endif
#define KEYOF(key) (key & 255)
enum {
KEY_LEFT, KEY_RIGHT,
KEY_UP, KEY_DOWN,
KEY_BUTTON_A, KEY_BUTTON_B,
KEY_BUTTON_START, KEY_BUTTON_SELECT,
KEY_BUTTON_L, KEY_BUTTON_R,
KEY_BUTTON_SPEED, KEY_BUTTON_CAPTURE,
KEY_BUTTON_GS
};
class Input {
public:
KeyList joypaddata[JOYPADS * KEYS_PER_PAD + MOTION_KEYS];
Input() {};
virtual ~Input() {};
virtual bool initialize() = 0;
virtual bool readDevices() = 0;
virtual u32 readDevice(int which) = 0;
virtual CString getKeyName(int key) = 0;
virtual void checkKeys() = 0;
virtual void checkMotionKeys() = 0;
virtual void checkDevices() = 0;
virtual void activate() = 0;
virtual void loadSettings() = 0;
virtual void saveSettings() = 0;
};
#define joypad theApp.input->joypaddata
#endif

View File

@ -32,6 +32,8 @@ static char THIS_FILE[] = __FILE__;
#endif
// Todo: Expand UI to allow user to enter multiple keys here.
// these are temporary quick hacks to make the new lists
// work with the old code.
int TempReadFirst(KeyList &Key)
{

File diff suppressed because it is too large Load Diff

View File

@ -225,6 +225,7 @@ void MainWnd::OnUpdateOptionsVideoFrameskip9(CCmdUI* pCmdUI)
void MainWnd::OnOptionsVideoVsync()
{
theApp.vsync = !theApp.vsync;
theApp.updateRenderMethod(true);
}
void MainWnd::OnUpdateOptionsVideoVsync(CCmdUI* pCmdUI)
@ -455,6 +456,7 @@ void MainWnd::OnUpdateOptionsVideoRendermethodOpengl(CCmdUI* pCmdUI)
void MainWnd::OnOptionsVideoTriplebuffering()
{
theApp.tripleBuffering = !theApp.tripleBuffering;
theApp.updateRenderMethod(true);
}
void MainWnd::OnUpdateOptionsVideoTriplebuffering(CCmdUI* pCmdUI)