diff --git a/VBA.vcproj b/VBA.vcproj
index c3f20f2e..385983da 100644
--- a/VBA.vcproj
+++ b/VBA.vcproj
@@ -1,7 +1,7 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
-
-
@@ -1021,10 +1017,6 @@
RelativePath=".\src\win32\TileView.cpp"
>
-
-
@@ -1149,7 +1141,7 @@
/>
-
-
@@ -1591,10 +1579,6 @@
RelativePath=".\src\win32\UniVideoModeDlg.h"
>
-
-
@@ -1858,6 +1842,14 @@
Outputs=""$(IntDir)\$(InputName).obj""
/>
+
+
+
@@ -1868,14 +1860,6 @@
Outputs=""$(IntDir)\$(InputName).obj""
/>
-
-
-
+
+
+
@@ -1908,14 +1900,6 @@
Outputs=""$(IntDir)\$(InputName).obj""
/>
-
-
-
+
+
+
@@ -1948,14 +1940,6 @@
Outputs=""$(IntDir)\$(InputName).obj""
/>
-
-
-
+
+
+
@@ -1988,14 +1980,6 @@
Outputs=""$(IntDir)\$(InputName).obj""
/>
-
-
-
VIDEO_4X && theApp.menuToggle)
- OnFileTogglemenu();
-
emulating = true;
if(theApp.autoLoadMostRecent)
diff --git a/src/win32/MainWnd.h b/src/win32/MainWnd.h
index b9d24152..70e51291 100644
--- a/src/win32/MainWnd.h
+++ b/src/win32/MainWnd.h
@@ -56,7 +56,6 @@ class MainWnd : public CWnd
void screenCapture(int captureNumber);
HACCEL m_hAccelTable;
bool fileOpenSelect( int system );
- afx_msg LRESULT OnConfirmMode(WPARAM, LPARAM);
afx_msg LRESULT OnMySysCommand(WPARAM, LPARAM);
afx_msg void OnUpdateFileLoadGameSlot(CCmdUI *pCmdUI);
afx_msg void OnUpdateFileSaveGameSlot(CCmdUI *pCmdUI);
@@ -78,7 +77,6 @@ class MainWnd : public CWnd
afx_msg void OnSystemMinimize();
afx_msg void OnUpdateVideoLayer(CCmdUI* pCmdUI);
afx_msg BOOL OnVideoLayer(UINT nID);
- void winConfirmMode();
afx_msg BOOL OnOptionVideoSize(UINT nID);
afx_msg BOOL OnOptionsFrameskip(UINT nID);
bool fileImportGSACodeFile(CString& fileName);
@@ -225,8 +223,6 @@ class MainWnd : public CWnd
afx_msg void OnUpdateOptionsEmulatorRealtimeclock(CCmdUI* pCmdUI);
afx_msg void OnOptionsEmulatorGenericflashcard();
afx_msg void OnUpdateOptionsEmulatorGenericflashcard(CCmdUI* pCmdUI);
- afx_msg void OnOptionsEmulatorAutohidemenu();
- afx_msg void OnUpdateOptionsEmulatorAutohidemenu(CCmdUI* pCmdUI);
afx_msg void OnOptionsEmulatorRewindinterval();
afx_msg void OnOptionsEmulatorSavetypeAutomatic();
afx_msg void OnUpdateOptionsEmulatorSavetypeAutomatic(CCmdUI* pCmdUI);
diff --git a/src/win32/MainWndCheats.cpp b/src/win32/MainWndCheats.cpp
index 2c343ce0..ebef9287 100644
--- a/src/win32/MainWndCheats.cpp
+++ b/src/win32/MainWndCheats.cpp
@@ -33,7 +33,6 @@ extern int emulating;
void MainWnd::OnCheatsSearchforcheats()
{
- theApp.winCheckFullscreen();
if(theApp.cartridgeType == 0) {
GBACheatSearch dlg;
dlg.DoModal();
@@ -50,7 +49,6 @@ void MainWnd::OnUpdateCheatsSearchforcheats(CCmdUI* pCmdUI)
void MainWnd::OnCheatsCheatlist()
{
- theApp.winCheckFullscreen();
if(theApp.cartridgeType == 0) {
GBACheatList dlg;
dlg.DoModal();
@@ -77,7 +75,6 @@ void MainWnd::OnUpdateCheatsAutomaticsaveloadcheats(CCmdUI* pCmdUI)
void MainWnd::OnCheatsLoadcheatlist()
{
- theApp.winCheckFullscreen();
CString buffer;
CString filename;
@@ -116,7 +113,6 @@ void MainWnd::OnUpdateCheatsLoadcheatlist(CCmdUI* pCmdUI)
void MainWnd::OnCheatsSavecheatlist()
{
- theApp.winCheckFullscreen();
CString buffer;
CString filename;
diff --git a/src/win32/MainWndFile.cpp b/src/win32/MainWndFile.cpp
index d6e7cb78..2802b49f 100644
--- a/src/win32/MainWndFile.cpp
+++ b/src/win32/MainWndFile.cpp
@@ -44,7 +44,6 @@ extern void InterframeCleanup();
void MainWnd::OnFileOpen()
{
- theApp.winCheckFullscreen();
if( fileOpenSelect( 0 ) ) {
FileRun();
}
@@ -166,7 +165,6 @@ void MainWnd::OnUpdateFileClose(CCmdUI* pCmdUI)
void MainWnd::OnFileOpengameboy()
{
- theApp.winCheckFullscreen();
if( fileOpenSelect( 2 ) ) {
FileRun();
}
@@ -175,7 +173,6 @@ void MainWnd::OnFileOpengameboy()
void MainWnd::OnFileOpenGbc()
{
- theApp.winCheckFullscreen();
if( fileOpenSelect( 1 ) ) {
FileRun();
}
@@ -184,7 +181,6 @@ void MainWnd::OnFileOpenGbc()
void MainWnd::OnFileLoad()
{
- theApp.winCheckFullscreen();
CString buffer;
CString filename;
@@ -293,7 +289,6 @@ BOOL MainWnd::OnFileLoadSlot(UINT nID)
void MainWnd::OnFileSave()
{
- theApp.winCheckFullscreen();
CString buffer;
CString filename;
@@ -390,7 +385,6 @@ BOOL MainWnd::OnFileSaveSlot(UINT nID)
void MainWnd::OnFileImportBatteryfile()
{
- theApp.winCheckFullscreen();
LPCTSTR exts[] = { ".sav", ".dat" };
CString filter = winLoadFilter(IDS_FILTER_SAV);
CString title = winResLoadString(IDS_SELECT_BATTERY_FILE);
@@ -442,7 +436,6 @@ void MainWnd::OnUpdateFileImportBatteryfile(CCmdUI* pCmdUI)
void MainWnd::OnFileImportGamesharkcodefile()
{
- theApp.winCheckFullscreen();
LPCTSTR exts[] = { "" };
CString filter = theApp.cartridgeType == 0 ? winLoadFilter(IDS_FILTER_SPC) : winLoadFilter(IDS_FILTER_GCF);
CString title = winResLoadString(IDS_SELECT_CODE_FILE);
@@ -476,7 +469,6 @@ void MainWnd::OnUpdateFileImportGamesharkcodefile(CCmdUI* pCmdUI)
void MainWnd::OnFileImportGamesharksnapshot()
{
- theApp.winCheckFullscreen();
LPCTSTR exts[] = { ".gbs" };
CString filter = theApp.cartridgeType == 1 ? winLoadFilter(IDS_FILTER_GBS) : winLoadFilter(IDS_FILTER_SPS);
CString title = winResLoadString(IDS_SELECT_SNAPSHOT_FILE);
@@ -507,7 +499,6 @@ void MainWnd::OnUpdateFileImportGamesharksnapshot(CCmdUI* pCmdUI)
void MainWnd::OnFileExportBatteryfile()
{
- theApp.winCheckFullscreen();
CString name;
int index = theApp.filename.ReverseFind('\\');
@@ -570,7 +561,6 @@ void MainWnd::OnUpdateFileExportBatteryfile(CCmdUI* pCmdUI)
void MainWnd::OnFileExportGamesharksnapshot()
{
- theApp.winCheckFullscreen();
if(eepromInUse) {
systemMessage(IDS_EEPROM_NOT_SUPPORTED, "EEPROM saves cannot be exported");
return;
@@ -618,7 +608,6 @@ void MainWnd::OnUpdateFileExportGamesharksnapshot(CCmdUI* pCmdUI)
void MainWnd::OnFileScreencapture()
{
- theApp.winCheckFullscreen();
CString name;
CString filename;
@@ -686,7 +675,6 @@ void MainWnd::OnUpdateFileScreencapture(CCmdUI* pCmdUI)
void MainWnd::OnFileRominformation()
{
- theApp.winCheckFullscreen();
if(theApp.cartridgeType == 0) {
RomInfoGBA dlg(rom);
dlg.DoModal();
@@ -703,34 +691,13 @@ void MainWnd::OnUpdateFileRominformation(CCmdUI* pCmdUI)
void MainWnd::OnFileTogglemenu()
{
- if(theApp.videoOption <= VIDEO_4X) {
- theApp.updateWindowSize( theApp.lastFullscreen );
- return;
- }
-
- if(( theApp.renderMethod != -1 )) { //either D3D OR OGL
- // display API does not support GDI objects in fullscreen
- theApp.updateWindowSize( theApp.lastWindowed );
- return;
- }
-
- theApp.menuToggle = !theApp.menuToggle;
-
- if(theApp.menuToggle) {
- theApp.updateMenuBar();
- if(theApp.tripleBuffering) {
- if(theApp.display)
- theApp.display->checkFullScreen();
- DrawMenuBar();
- }
- } else {
- SetMenu(NULL);
- DestroyMenu(theApp.menu);
- }
-
- theApp.adjustDestRect();
- if(theApp.display)
- theApp.display->resize(theApp.dest.right-theApp.dest.left, theApp.dest.bottom-theApp.dest.top);
+ if( theApp.videoOption <= VIDEO_4X ) {
+ // switch to full screen
+ theApp.updateWindowSize( theApp.lastFullscreen );
+ } else {
+ // switch to windowed mode
+ theApp.updateWindowSize( theApp.lastWindowed );
+ }
}
void MainWnd::OnUpdateFileTogglemenu(CCmdUI* pCmdUI)
diff --git a/src/win32/MainWndHelp.cpp b/src/win32/MainWndHelp.cpp
index 911934a8..06d2d1f1 100644
--- a/src/win32/MainWndHelp.cpp
+++ b/src/win32/MainWndHelp.cpp
@@ -25,7 +25,6 @@ extern int emulating;
void MainWnd::OnHelpAbout()
{
- theApp.winCheckFullscreen();
AboutDialog dlg;
dlg.DoModal();
diff --git a/src/win32/MainWndOptions.cpp b/src/win32/MainWndOptions.cpp
index 4fe61ccb..d5596393 100644
--- a/src/win32/MainWndOptions.cpp
+++ b/src/win32/MainWndOptions.cpp
@@ -27,7 +27,6 @@
#include "GBColorDlg.h"
#include "Joypad.h"
#include "MaxScale.h"
-#include "ModeConfirm.h"
#include "Reg.h"
#include "RewindInterval.h"
#include "skin.h"
@@ -50,8 +49,6 @@
extern int emulating;
-#define VBA_CONFIRM_MODE WM_APP + 100
-
extern void CPUUpdateRenderBuffers(bool force);
@@ -337,8 +334,6 @@ void MainWnd::OnOptionsVideoFullscreen1280x1024()
void MainWnd::OnOptionsVideoFullscreen()
{
- theApp.winCheckFullscreen();
-
IDisplay::VIDEO_MODE mode;
ZeroMemory( &mode, sizeof(IDisplay::VIDEO_MODE) );
@@ -347,7 +342,6 @@ void MainWnd::OnOptionsVideoFullscreen()
( mode.height != theApp.fsHeight ) ||
( mode.bitDepth != theApp.fsColorDepth ) ||
( mode.frequency != theApp.fsFrequency ) ||
- ( mode.adapter_ddraw != theApp.pVideoDriverGUID ) ||
( mode.adapter != theApp.fsAdapter ) ||
( theApp.videoOption != VIDEO_OTHER ) )
{
@@ -356,16 +350,7 @@ void MainWnd::OnOptionsVideoFullscreen()
theApp.fsHeight = mode.height;
theApp.fsFrequency = mode.frequency;
theApp.fsColorDepth = mode.bitDepth;
- theApp.pVideoDriverGUID = mode.adapter_ddraw;
theApp.fsAdapter = mode.adapter;
- if( mode.adapter_ddraw ) {
- theApp.videoDriverGUID = *mode.adapter_ddraw;
- regSetDwordValue( "defaultVideoDriver", FALSE );
- regSetBinaryValue( "videoDriverGUID",
- (char *)mode.adapter_ddraw, sizeof(GUID) );
- } else {
- regSetDwordValue( "defaultVideoDriver", TRUE );
- }
theApp.updateVideoSize( ID_OPTIONS_VIDEO_FULLSCREEN );
}
}
@@ -589,14 +574,12 @@ void MainWnd::OnOptionsVideoRenderingoptionsGLSLShaders()
void MainWnd::OnOptionsEmulatorAssociate()
{
- theApp.winCheckFullscreen();
Associate dlg;
dlg.DoModal();
}
void MainWnd::OnOptionsEmulatorDirectories()
{
- theApp.winCheckFullscreen();
Directories dlg;
dlg.DoModal();
}
@@ -673,11 +656,6 @@ void MainWnd::OnUpdateOptionsEmulatorRealtimeclock(CCmdUI* pCmdUI)
pCmdUI->SetCheck(theApp.winRtcEnable);
}
-void MainWnd::OnOptionsEmulatorAutohidemenu()
-{
- theApp.autoHideMenu = !theApp.autoHideMenu;
-}
-
void MainWnd::OnOptionsEmulatorGenericflashcard()
{
if(emulating && theApp.cartridgeType == IMAGE_GB)
@@ -694,12 +672,6 @@ void MainWnd::OnUpdateOptionsEmulatorGenericflashcard(CCmdUI* pCmdUI)
pCmdUI->Enable(emulating && theApp.cartridgeType == IMAGE_GB);
}
-void MainWnd::OnUpdateOptionsEmulatorAutohidemenu(CCmdUI* pCmdUI)
-{
- pCmdUI->SetCheck(theApp.autoHideMenu);
-}
-
-
void MainWnd::OnOptionsEmulatorRewindinterval()
{
RewindInterval dlg(theApp.rewindTimer/6);
@@ -1271,7 +1243,6 @@ void MainWnd::OnUpdateOptionsGameboyGameboycolors(CCmdUI* pCmdUI)
void MainWnd::OnOptionsGameboyColors()
{
- theApp.winCheckFullscreen();
GBColorDlg dlg;
if(dlg.DoModal()) {
gbPaletteOption = dlg.getWhich();
@@ -1536,7 +1507,6 @@ void MainWnd::OnUpdateOptionsLanguageEnglish(CCmdUI* pCmdUI)
void MainWnd::OnOptionsLanguageOther()
{
- theApp.winCheckFullscreen();
theApp.winSetLanguageOption(2, false);
theApp.winAccelMgr.UpdateMenu(theApp.menu);
}
@@ -1549,7 +1519,6 @@ void MainWnd::OnUpdateOptionsLanguageOther(CCmdUI* pCmdUI)
void MainWnd::OnOptionsJoypadConfigure1()
{
- theApp.winCheckFullscreen();
JoypadConfig dlg(0);
dlg.DoModal();
}
@@ -1561,7 +1530,6 @@ void MainWnd::OnUpdateOptionsJoypadConfigure1(CCmdUI* pCmdUI)
void MainWnd::OnOptionsJoypadConfigure2()
{
- theApp.winCheckFullscreen();
JoypadConfig dlg(1);
dlg.DoModal();
}
@@ -1573,7 +1541,6 @@ void MainWnd::OnUpdateOptionsJoypadConfigure2(CCmdUI* pCmdUI)
void MainWnd::OnOptionsJoypadConfigure3()
{
- theApp.winCheckFullscreen();
JoypadConfig dlg(2);
dlg.DoModal();
}
@@ -1585,7 +1552,6 @@ void MainWnd::OnUpdateOptionsJoypadConfigure3(CCmdUI* pCmdUI)
void MainWnd::OnOptionsJoypadConfigure4()
{
- theApp.winCheckFullscreen();
JoypadConfig dlg(3);
dlg.DoModal();
}
@@ -1608,7 +1574,6 @@ void MainWnd::OnUpdateOptionsJoypadDefault(CCmdUI *pCmdUI)
void MainWnd::OnOptionsJoypadMotionconfigure()
{
- theApp.winCheckFullscreen();
MotionConfig dlg;
dlg.DoModal();
}
@@ -1683,33 +1648,10 @@ void MainWnd::OnUpdateOptionsJoypadAutofire(CCmdUI *pCmdUI)
pCmdUI->SetCheck(check);
}
-LRESULT MainWnd::OnConfirmMode(WPARAM, LPARAM)
-{
- // we need to do this separately or the window will not have the right
- // parent. must be related to the way MFC does modal dialogs
- winConfirmMode();
- return 0;
-}
-
-void MainWnd::winConfirmMode()
-{
- if( theApp.videoOption > VIDEO_4X ) {
- theApp.winCheckFullscreen();
- ModeConfirm dlg(theApp.m_pMainWnd);
-
- if(!dlg.DoModal()) {
- theApp.updateVideoSize(ID_OPTIONS_VIDEO_X2);
- }
- }
- theApp.winAccelMgr.UpdateMenu(theApp.menu);
-}
-
void MainWnd::OnOptionsVideoFullscreenmaxscale()
{
MaxScale dlg;
- theApp.winCheckFullscreen();
-
dlg.DoModal();
if( theApp.display ) {
@@ -1967,8 +1909,6 @@ void MainWnd::OnUpdateRenderapiD3dmotionblur(CCmdUI *pCmdUI)
void MainWnd::OnEmulatorBiosfiles()
{
- theApp.winCheckFullscreen();
-
BIOSDialog dlg;
dlg.m_enableBIOS_GBA = theApp.useBiosFileGBA ? TRUE : FALSE;
dlg.m_enableBIOS_GB = theApp.useBiosFileGB ? TRUE : FALSE;
diff --git a/src/win32/MainWndTools.cpp b/src/win32/MainWndTools.cpp
index 5fd6f52a..dca7de13 100644
--- a/src/win32/MainWndTools.cpp
+++ b/src/win32/MainWndTools.cpp
@@ -197,7 +197,6 @@ void MainWnd::OnDebugNextframe()
void MainWnd::OnToolsDebugGdb()
{
- theApp.winCheckFullscreen();
GDBPortDlg dlg;
if(dlg.DoModal()) {
@@ -233,7 +232,6 @@ void MainWnd::OnUpdateToolsDebugGdb(CCmdUI* pCmdUI)
void MainWnd::OnToolsDebugLoadandwait()
{
- theApp.winCheckFullscreen();
if(fileOpenSelect(0)) {
if(FileRun()) {
if(theApp.cartridgeType != 0) {
@@ -290,7 +288,6 @@ void MainWnd::OnUpdateToolsDebugDisconnect(CCmdUI* pCmdUI)
void MainWnd::OnOptionsSoundStartrecording()
{
- theApp.winCheckFullscreen();
CString captureBuffer;
CString capdir = regQueryStringValue("soundRecordDir", NULL);
@@ -345,8 +342,6 @@ void MainWnd::OnUpdateOptionsSoundStoprecording(CCmdUI* pCmdUI)
void MainWnd::OnToolsRecordStartavirecording()
{
- theApp.winCheckFullscreen();
-
CString captureBuffer;
CString capdir = regQueryStringValue( "aviRecordDir", NULL );
@@ -459,7 +454,6 @@ void MainWnd::OnUpdateToolsRecordStopavirecording(CCmdUI* pCmdUI)
void MainWnd::OnToolsRecordStartmovierecording()
{
- theApp.winCheckFullscreen();
CString captureBuffer;
CString capdir = regQueryStringValue("movieRecordDir", "");
diff --git a/src/win32/ModeConfirm.cpp b/src/win32/ModeConfirm.cpp
deleted file mode 100644
index dec8bac3..00000000
--- a/src/win32/ModeConfirm.cpp
+++ /dev/null
@@ -1,113 +0,0 @@
-// 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.
-
-// ModeConfirm.cpp : implementation file
-//
-
-#include "stdafx.h"
-#include "vba.h"
-#include "ModeConfirm.h"
-
-#ifdef _DEBUG
-#define new DEBUG_NEW
-#undef THIS_FILE
-static char THIS_FILE[] = __FILE__;
-#endif
-
-/////////////////////////////////////////////////////////////////////////////
-// ModeConfirm dialog
-
-
-ModeConfirm::ModeConfirm(CWnd* pParent /*=NULL*/)
- : CDialog(ModeConfirm::IDD, pParent)
-{
- //{{AFX_DATA_INIT(ModeConfirm)
- // NOTE: the ClassWizard will add member initialization here
- //}}AFX_DATA_INIT
-}
-
-
-void ModeConfirm::DoDataExchange(CDataExchange* pDX)
-{
- CDialog::DoDataExchange(pDX);
- //{{AFX_DATA_MAP(ModeConfirm)
- // NOTE: the ClassWizard will add DDX and DDV calls here
- //}}AFX_DATA_MAP
-}
-
-
-BEGIN_MESSAGE_MAP(ModeConfirm, CDialog)
- //{{AFX_MSG_MAP(ModeConfirm)
- ON_BN_CLICKED(ID_CANCEL, OnCancel)
- ON_BN_CLICKED(ID_OK, OnOk)
- ON_WM_DESTROY()
- ON_WM_TIMER()
- //}}AFX_MSG_MAP
- END_MESSAGE_MAP()
-
- /////////////////////////////////////////////////////////////////////////////
-// ModeConfirm message handlers
-
-void ModeConfirm::OnCancel()
-{
- EndDialog(FALSE);
-}
-
-void ModeConfirm::OnOk()
-{
- EndDialog(TRUE);
-}
-
-void ModeConfirm::OnDestroy()
-{
- CDialog::OnDestroy();
-
- KillTimer(timer);
- timer = 0;
-}
-
-BOOL ModeConfirm::OnInitDialog()
-{
- CDialog::OnInitDialog();
-
- timer = SetTimer(0, 1000, NULL);
-
- count = 10;
-
- CString buffer;
- buffer.Format("%d", count);
-
- GetDlgItem(IDC_TIMER)->SetWindowText(buffer);
-
- CenterWindow(theApp.m_pMainWnd);
-
- return TRUE; // return TRUE unless you set the focus to a control
- // EXCEPTION: OCX Property Pages should return FALSE
-}
-
-void ModeConfirm::OnTimer(UINT_PTR nIDEvent)
-{
- CString buffer;
- count--;
- if(count == 0)
- EndDialog(FALSE);
- buffer.Format("%d", count);
- GetDlgItem(IDC_TIMER)->SetWindowText(buffer);
-
- CDialog::OnTimer(nIDEvent);
-}
diff --git a/src/win32/ModeConfirm.h b/src/win32/ModeConfirm.h
deleted file mode 100644
index 4f8787ec..00000000
--- a/src/win32/ModeConfirm.h
+++ /dev/null
@@ -1,71 +0,0 @@
-// -*- 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.
-
-#if !defined(AFX_MODECONFIRM_H__AF9F877E_6EDF_4523_95C9_1C745ABBA796__INCLUDED_)
-#define AFX_MODECONFIRM_H__AF9F877E_6EDF_4523_95C9_1C745ABBA796__INCLUDED_
-
-#if _MSC_VER > 1000
-#pragma once
-#endif // _MSC_VER > 1000
-// ModeConfirm.h : header file
-//
-
-/////////////////////////////////////////////////////////////////////////////
-// ModeConfirm dialog
-
-class ModeConfirm : public CDialog
-{
- // Construction
- public:
- int count;
- UINT_PTR timer;
- ModeConfirm(CWnd* pParent); // standard constructor
-
- // Dialog Data
- //{{AFX_DATA(ModeConfirm)
- enum { IDD = IDD_MODE_CONFIRM };
- // NOTE: the ClassWizard will add data members here
- //}}AFX_DATA
-
-
- // Overrides
- // ClassWizard generated virtual function overrides
- //{{AFX_VIRTUAL(ModeConfirm)
- protected:
- virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
- //}}AFX_VIRTUAL
-
- // Implementation
- protected:
-
- // Generated message map functions
- //{{AFX_MSG(ModeConfirm)
- afx_msg void OnCancel();
- afx_msg void OnOk();
- afx_msg void OnDestroy();
- virtual BOOL OnInitDialog();
- afx_msg void OnTimer(UINT_PTR nIDEvent);
- //}}AFX_MSG
- DECLARE_MESSAGE_MAP()
- };
-
- //{{AFX_INSERT_LOCATION}}
- // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
-
-#endif // !defined(AFX_MODECONFIRM_H__AF9F877E_6EDF_4523_95C9_1C745ABBA796__INCLUDED_)
diff --git a/src/win32/VBA.cpp b/src/win32/VBA.cpp
index 9dbd1742..3dc1d124 100644
--- a/src/win32/VBA.cpp
+++ b/src/win32/VBA.cpp
@@ -17,8 +17,12 @@
// along with this program; if not, write to the Free Software Foundation,
// Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-// VBA.cpp : Defines the class behaviors for the application.
-//
+#ifdef NO_D3D
+#ifdef NO_OGL
+#error NO_D3D and NO_OGL must not be defined at the same time.
+#endif
+#endif
+
#include "stdafx.h"
#include "AVIWrite.h"
@@ -271,13 +275,11 @@ VBA::VBA()
rewindTimer = 0;
captureFormat = 0;
tripleBuffering = true;
- autoHideMenu = false;
throttle = 0;
autoFrameSkipLastTime = 0;
autoFrameSkip = false;
vsync = false;
changingVideoSize = false;
- pVideoDriverGUID = NULL;
renderMethod = DIRECT_3D;
audioAPI = DIRECTSOUND;
#ifndef NO_OAL
@@ -528,8 +530,6 @@ BOOL VBA::InitInstance()
if(!initDisplay()) {
if(videoOption >= VIDEO_320x240) {
regSetDwordValue("video", VIDEO_1X);
- if(pVideoDriverGUID)
- regSetDwordValue("defaultVideoDriver", TRUE);
}
return FALSE;
}
@@ -1087,8 +1087,6 @@ void systemMessage(int number, const char *defaultMsg, ...)
va_start(valist, defaultMsg);
buffer.FormatV(msg, valist);
- theApp.winCheckFullscreen();
-
AfxGetApp()->m_pMainWnd->MessageBox(buffer, winResLoadString(IDS_ERROR), MB_OK|MB_ICONERROR);
va_end(valist);
@@ -1422,19 +1420,6 @@ void VBA::loadSettings()
if(videoOption < VIDEO_1X || videoOption > VIDEO_OTHER)
videoOption = VIDEO_3X;
- bool defaultVideoDriver = regQueryDwordValue("defaultVideoDriver", true) ?
- true : false;
-
- if(!regQueryBinaryValue("videoDriverGUID", (char *)&videoDriverGUID,
- sizeof(GUID))) {
- defaultVideoDriver = TRUE;
- }
-
- if(defaultVideoDriver)
- pVideoDriverGUID = NULL;
- else
- pVideoDriverGUID = &videoDriverGUID;
-
fsAdapter = regQueryDwordValue("fsAdapter", 0);
fsWidth = regQueryDwordValue("fsWidth", 800);
fsHeight = regQueryDwordValue("fsHeight", 600);
@@ -1449,12 +1434,13 @@ void VBA::loadSettings()
}
renderMethod = (DISPLAY_TYPE)regQueryDwordValue("renderMethod", DIRECT_3D);
- if( ( renderMethod != DIRECT_3D )
+ if( ( renderMethod != DIRECT_3D ) && ( renderMethod != OPENGL ) ) {
#ifndef NO_OGL
- && ( renderMethod != OPENGL )
+ renderMethod = OPENGL;
+#endif
+#ifndef NO_D3D
+ renderMethod = DIRECT_3D;
#endif
- ) {
- renderMethod = DIRECT_3D;
}
audioAPI = (AUDIO_API)regQueryDwordValue( "audioAPI", DIRECTSOUND );
@@ -1586,8 +1572,6 @@ void VBA::loadSettings()
winRtcEnable = regQueryDwordValue("rtcEnabled", 0) ? true : false;
rtcEnable(winRtcEnable);
- autoHideMenu = regQueryDwordValue("autoHideMenu", 0) ? true : false;
-
skinEnabled = regQueryDwordValue("skinEnabled", 0) ? true : false;
skinName = regQueryStringValue("skinName", "");
@@ -1815,8 +1799,6 @@ void VBA::updateWindowSize(int value)
videoOption == VIDEO_1280x1024 ||
videoOption == VIDEO_OTHER) {
regSetDwordValue("video", VIDEO_1X);
- if(pVideoDriverGUID)
- regSetDwordValue("defaultVideoDriver", TRUE);
}
changingVideoSize = false;
AfxPostQuitMessage(0);
@@ -2185,16 +2167,6 @@ bool VBA::updateRenderMethod0(bool force)
}
-void VBA::winCheckFullscreen()
-{
- if(videoOption > VIDEO_4X && tripleBuffering) {
- if(display) {
- display->checkFullScreen();
- }
- }
-}
-
-
void VBA::shutdownDisplay()
{
if(display != NULL) {
@@ -2504,14 +2476,6 @@ void VBA::saveSettings()
regSetDwordValue("video", videoOption);
- regSetDwordValue("defaultVideoDriver", pVideoDriverGUID == NULL);
-
- if(pVideoDriverGUID) {
- regSetBinaryValue("videoDriverGUID", (char *)&videoDriverGUID,
- sizeof(GUID));
- }
-
-
regSetDwordValue("fsAdapter", fsAdapter);
regSetDwordValue("fsWidth", fsWidth);
regSetDwordValue("fsHeight", fsHeight);
@@ -2597,8 +2561,6 @@ void VBA::saveSettings()
regSetDwordValue("rtcEnabled", winRtcEnable);
- regSetDwordValue("autoHideMenu", autoHideMenu);
-
regSetDwordValue("skinEnabled", skinEnabled);
regSetStringValue("skinName", skinName);
diff --git a/src/win32/VBA.h b/src/win32/VBA.h
index 0a346f73..4538cd24 100644
--- a/src/win32/VBA.h
+++ b/src/win32/VBA.h
@@ -144,14 +144,11 @@ class VBA : public CWinApp
int rewindTimer;
int captureFormat;
bool tripleBuffering;
- bool autoHideMenu;
unsigned short throttle;
u32 autoFrameSkipLastTime;
bool autoFrameSkip;
bool vsync;
bool changingVideoSize;
- GUID videoDriverGUID;
- GUID *pVideoDriverGUID;
DISPLAY_TYPE renderMethod;
AUDIO_API audioAPI;
#ifndef NO_OAL
@@ -265,7 +262,6 @@ class VBA : public CWinApp
void winUpdateSkin();
void directXMessage(const char *msg);
void shutdownDisplay();
- void winCheckFullscreen();
bool preInitialize();
bool updateRenderMethod0(bool force);
bool updateRenderMethod(bool force);
diff --git a/src/win32/VBA.rc b/src/win32/VBA.rc
index d7b073ef..107b035c 100644
--- a/src/win32/VBA.rc
+++ b/src/win32/VBA.rc
@@ -1,6 +1,6 @@
// Microsoft Visual C++ generated resource script.
//
-#include "resource.h"
+#include "resource."
#define APSTUDIO_READONLY_SYMBOLS
/////////////////////////////////////////////////////////////////////////////
@@ -893,17 +893,6 @@ BEGIN
LTEXT "Size:",IDC_STATIC,7,29,65,8
END
-IDD_MODES DIALOG 0, 0, 208, 129
-STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
-CAPTION "Select video mode"
-FONT 8, "MS Sans Serif"
-BEGIN
- LISTBOX IDC_MODES,7,18,194,80,LBS_SORT | LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_TABSTOP
- DEFPUSHBUTTON "OK",ID_OK,45,108,50,14
- PUSHBUTTON "Cancel",ID_CANCEL,112,108,50,14
- LTEXT "Available video modes:",IDC_STATIC,7,7,194,8
-END
-
IDD_DRIVERS DIALOG 0, 0, 208, 121
STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Select video driver"
@@ -1091,17 +1080,6 @@ BEGIN
CONTROL "Automatic update",IDC_AUTO_UPDATE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,178,71,10
END
-IDD_MODE_CONFIRM DIALOG 0, 0, 186, 57
-STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
-CAPTION "Confirm mode"
-FONT 8, "MS Sans Serif"
-BEGIN
- DEFPUSHBUTTON "OK",ID_OK,31,36,50,14
- PUSHBUTTON "Cancel",ID_CANCEL,103,36,50,14
- CTEXT "Do you want to keep the current mode?",IDC_STATIC,7,7,172,8
- CTEXT "",IDC_TIMER,7,19,172,8,SS_NOPREFIX,WS_EX_TOOLWINDOW
-END
-
IDD_REWIND_INTERVAL DIALOG 0, 0, 186, 68
STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Select rewind interval"
@@ -1460,14 +1438,6 @@ BEGIN
BOTTOMMARGIN, 60
END
- IDD_MODES, DIALOG
- BEGIN
- LEFTMARGIN, 7
- RIGHTMARGIN, 201
- TOPMARGIN, 7
- BOTTOMMARGIN, 122
- END
-
IDD_DRIVERS, DIALOG
BEGIN
LEFTMARGIN, 7
@@ -1524,14 +1494,6 @@ BEGIN
BOTTOMMARGIN, 227
END
- IDD_MODE_CONFIRM, DIALOG
- BEGIN
- LEFTMARGIN, 7
- RIGHTMARGIN, 179
- TOPMARGIN, 7
- BOTTOMMARGIN, 50
- END
-
IDD_REWIND_INTERVAL, DIALOG
BEGIN
LEFTMARGIN, 7
@@ -1877,7 +1839,6 @@ BEGIN
MENUITEM "AGB Print", ID_OPTIONS_EMULATOR_AGBPRINT
MENUITEM "Real Time Clock", ID_OPTIONS_EMULATOR_REALTIMECLOCK
MENUITEM "&Game Overrides...", ID_OPTIONS_EMULATOR_GAMEOVERRIDES
- MENUITEM "Auto hide menu", ID_OPTIONS_EMULATOR_AUTOHIDEMENU
POPUP "Show speed"
BEGIN
MENUITEM "None", ID_OPTIONS_EMULATOR_SHOWSPEED_NONE
diff --git a/src/win32/VideoMode.cpp b/src/win32/VideoMode.cpp
deleted file mode 100644
index 2d9b6837..00000000
--- a/src/win32/VideoMode.cpp
+++ /dev/null
@@ -1,395 +0,0 @@
-// 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.
-
-// VideoMode.cpp : implementation file
-//
-
-#include "stdafx.h"
-#include "VBA.h"
-
-#define DIRECTDRAW_VERSION 0x0700
-#include
-
-#include "VideoMode.h"
-
-#include "../System.h"
-#include "resource.h"
-
-
-#ifdef _DEBUG
-#define new DEBUG_NEW
-#undef THIS_FILE
-static char THIS_FILE[] = __FILE__;
-#endif
-
-#define MAX_DRIVERS 32 // 32 drivers maximum
-
-//-----------------------------------------------------------------------------
-// Local structures
-//-----------------------------------------------------------------------------
-// Keeps data on the available DDraw drivers
-struct
-{
- char szDescription[128];
- char szName[128];
- GUID *pGUID;
- GUID GUIDcopy;
- HMONITOR hm;
-} Drivers[MAX_DRIVERS];
-
-//-----------------------------------------------------------------------------
-// Local data
-//-----------------------------------------------------------------------------
-static int gDriverCnt = 0; // Total number of drivers
-static GUID *gpSelectedDriverGUID;
-
-//-----------------------------------------------------------------------------
-// Name: DDEnumCallbackEx()
-// Desc: This call back is used to determine the existing available DDraw
-// devices, so the user can pick which one to run on.
-//-----------------------------------------------------------------------------
-BOOL WINAPI
-DDEnumCallbackEx(GUID *pGUID, LPSTR pDescription, LPSTR pName, LPVOID pContext, HMONITOR hm)
-{
- if (pGUID)
- {
- Drivers[gDriverCnt].GUIDcopy = *pGUID;
- Drivers[gDriverCnt].pGUID = &Drivers[gDriverCnt].GUIDcopy;
- }
- else
- Drivers[gDriverCnt].pGUID = NULL;
- Drivers[gDriverCnt].szDescription[127] = '\0';
- Drivers[gDriverCnt].szName[127] = '\0';
- strncpy(Drivers[gDriverCnt].szDescription,pDescription,127);
- strncpy(Drivers[gDriverCnt].szName,pName,127);
- Drivers[gDriverCnt].hm = hm;
- if (gDriverCnt < MAX_DRIVERS)
- gDriverCnt++;
- else
- return DDENUMRET_CANCEL;
- return DDENUMRET_OK;
-}
-
-
-
-
-//-----------------------------------------------------------------------------
-// Name: DDEnumCallback()
-// Desc: This callback is used only with old versions of DDraw.
-//-----------------------------------------------------------------------------
-BOOL WINAPI
-DDEnumCallback(GUID *pGUID, LPSTR pDescription, LPSTR pName, LPVOID context)
-{
- return (DDEnumCallbackEx(pGUID, pDescription, pName, context, NULL));
-}
-
-static HRESULT WINAPI addVideoMode(LPDDSURFACEDESC2 surf, LPVOID lpContext)
-{
- HWND h = (HWND)lpContext;
- char buffer[50];
-
- switch( surf->ddpfPixelFormat.dwRGBBitCount )
- {
- case 16:
- case 24:
- case 32:
- sprintf(
- buffer,
- _T("%4dx%4dx%2d"),
- surf->dwWidth,
- surf->dwHeight,
- surf->ddpfPixelFormat.dwRGBBitCount
- );
- WPARAM pos = ::SendMessage( h, LB_ADDSTRING, 0, (LPARAM)buffer );
- ::SendMessage(
- h,
- LB_SETITEMDATA,
- pos,
- (surf->ddpfPixelFormat.dwRGBBitCount << 24) |
- ((surf->dwWidth & 4095) << 12) |
- (surf->dwHeight & 4095)
- );
- break;
- }
-
- return DDENUMRET_OK;
-}
-
-int winVideoModeSelect(CWnd *pWnd, GUID **guid)
-{
-#ifdef _AFXDLL
- HINSTANCE h = AfxLoadLibrary("ddraw.dll");
-#else
- HMODULE h = LoadLibrary( _T("ddraw.dll") );
-#endif
-
- // If ddraw.dll doesn't exist in the search path,
- // then DirectX probably isn't installed, so fail.
- if (!h)
- return -1;
-
- gDriverCnt = 0;
-
- // Note that you must know which version of the
- // function to retrieve (see the following text).
- // For this example, we use the ANSI version.
- LPDIRECTDRAWENUMERATEEX lpDDEnumEx;
- lpDDEnumEx = (LPDIRECTDRAWENUMERATEEX)
- GetProcAddress(h,"DirectDrawEnumerateExA");
-
- // If the function is there, call it to enumerate all display
- // devices attached to the desktop, and any non-display DirectDraw
- // devices.
- if (lpDDEnumEx)
- lpDDEnumEx(DDEnumCallbackEx, NULL,
- DDENUM_ATTACHEDSECONDARYDEVICES |
- DDENUM_NONDISPLAYDEVICES
- );
- else {
- /*
- * We must be running on an old version of DirectDraw.
- * Therefore MultiMon isn't supported. Fall back on
- * DirectDrawEnumerate to enumerate standard devices on a
- * single-monitor system.
- */
- BOOL (WINAPI *lpDDEnum)(LPDDENUMCALLBACK, LPVOID);
-
- lpDDEnum = (BOOL (WINAPI *)(LPDDENUMCALLBACK, LPVOID))
- GetProcAddress(h, "DirectDrawEnumerateA");
- if(lpDDEnum)
- lpDDEnum(DDEnumCallback,NULL);
-
- /* Note that it could be handy to let the OldCallback function
- * be a wrapper for a DDEnumCallbackEx.
- *
- * Such a function would look like:
- * BOOL FAR PASCAL OldCallback(GUID FAR *lpGUID,
- * LPSTR pDesc,
- * LPSTR pName,
- * LPVOID pContext)
- * {
- * return Callback(lpGUID,pDesc,pName,pContext,NULL);
- * }
- */
- }
-
- int selected = 0;
-
- if(gDriverCnt > 1) {
- VideoDriverSelect d(pWnd);
-
- INT_PTR selected = d.DoModal();
-
- if(selected == -1) {
-#ifdef _AFXDLL
- AfxFreeLibrary( h );
-#else
- FreeLibrary( h );
-#endif
-
- return -1;
- }
- }
-
- HRESULT (WINAPI *DDrawCreateEx)(GUID *,LPVOID *,REFIID,IUnknown *);
- DDrawCreateEx = (HRESULT (WINAPI *)(GUID *,LPVOID *,REFIID,IUnknown *))
- GetProcAddress(h, "DirectDrawCreateEx");
-
- LPDIRECTDRAW7 ddraw = NULL;
- if(DDrawCreateEx) {
- HRESULT hret = DDrawCreateEx(Drivers[selected].pGUID,
- (void **)&ddraw,
- IID_IDirectDraw7,
- NULL);
- if(hret != DD_OK) {
- systemMessage(0, "Error during DirectDrawCreateEx: %08x", hret);
-#ifdef _AFXDLL
- AfxFreeLibrary( h );
-#else
- FreeLibrary( h );
-#endif
- return -1;
- }
- } else {
- // should not happen....
- systemMessage(0, "Error getting DirectDrawCreateEx");
-#ifdef _AFXDLL
- AfxFreeLibrary( h );
-#else
- FreeLibrary( h );
-#endif
- return -1;
- }
-
- VideoMode dlg(ddraw, pWnd);
-
- INT_PTR res = dlg.DoModal();
-
- if(res != -1) {
- *guid = Drivers[selected].pGUID;
- }
- ddraw->Release();
- ddraw = NULL;
-
- // If the library was loaded by calling LoadLibrary(),
- // then you must use FreeLibrary() to let go of it.
-#ifdef _AFXDLL
- AfxFreeLibrary( h );
-#else
- FreeLibrary( h );
-#endif
-
- return (int)res;
-}
-
-/////////////////////////////////////////////////////////////////////////////
-// VideoMode dialog
-
-
-VideoMode::VideoMode(LPDIRECTDRAW7 pDraw, CWnd* pParent /*=NULL*/)
- : CDialog(VideoMode::IDD, pParent)
-{
- //{{AFX_DATA_INIT(VideoMode)
- // NOTE: the ClassWizard will add member initialization here
- //}}AFX_DATA_INIT
- pDirectDraw = pDraw;
-}
-
-
-void VideoMode::DoDataExchange(CDataExchange* pDX)
-{
- CDialog::DoDataExchange(pDX);
- //{{AFX_DATA_MAP(VideoMode)
- DDX_Control(pDX, IDC_MODES, m_modes);
- //}}AFX_DATA_MAP
-}
-
-
-BEGIN_MESSAGE_MAP(VideoMode, CDialog)
- //{{AFX_MSG_MAP(VideoMode)
- ON_LBN_SELCHANGE(IDC_MODES, OnSelchangeModes)
- ON_BN_CLICKED(ID_CANCEL, OnCancel)
- ON_BN_CLICKED(ID_OK, OnOk)
- //}}AFX_MSG_MAP
- END_MESSAGE_MAP()
-
- /////////////////////////////////////////////////////////////////////////////
-// VideoMode message handlers
-
-void VideoMode::OnSelchangeModes()
-{
- int item = m_modes.GetCurSel();
-
- GetDlgItem(ID_OK)->EnableWindow(item != -1);
-}
-
-void VideoMode::OnCancel()
-{
- EndDialog(-1);
-}
-
-void VideoMode::OnOk()
-{
- DWORD_PTR cur = m_modes.GetCurSel();
-
- if(cur != -1) {
- cur = m_modes.GetItemData((int)cur);
- }
- EndDialog((int)cur);
-}
-
-BOOL VideoMode::OnInitDialog()
-{
- CDialog::OnInitDialog();
-
- // check for available fullscreen modes
- pDirectDraw->EnumDisplayModes(
- DDEDM_STANDARDVGAMODES,
- NULL,
- m_modes.m_hWnd,
- addVideoMode);
-
- GetDlgItem(ID_OK)->EnableWindow(FALSE);
- CenterWindow();
-
- return TRUE; // return TRUE unless you set the focus to a control
- // EXCEPTION: OCX Property Pages should return FALSE
-}
-
-/////////////////////////////////////////////////////////////////////////////
-// VideoDriverSelect dialog
-
-
-VideoDriverSelect::VideoDriverSelect(CWnd* pParent /*=NULL*/)
- : CDialog(VideoDriverSelect::IDD, pParent)
-{
- //{{AFX_DATA_INIT(VideoDriverSelect)
- // NOTE: the ClassWizard will add member initialization here
- //}}AFX_DATA_INIT
-}
-
-
-void VideoDriverSelect::DoDataExchange(CDataExchange* pDX)
-{
- CDialog::DoDataExchange(pDX);
- //{{AFX_DATA_MAP(VideoDriverSelect)
- DDX_Control(pDX, IDC_DRIVERS, m_drivers);
- //}}AFX_DATA_MAP
-}
-
-
-BEGIN_MESSAGE_MAP(VideoDriverSelect, CDialog)
- //{{AFX_MSG_MAP(VideoDriverSelect)
- ON_BN_CLICKED(ID_OK, OnOk)
- ON_BN_CLICKED(ID_CANCEL, OnCancel)
- ON_LBN_SELCHANGE(IDC_DRIVERS, OnSelchangeDrivers)
- //}}AFX_MSG_MAP
- END_MESSAGE_MAP()
-
- /////////////////////////////////////////////////////////////////////////////
-// VideoDriverSelect message handlers
-
-void VideoDriverSelect::OnCancel()
-{
- EndDialog(-1);
-}
-
-void VideoDriverSelect::OnOk()
-{
- EndDialog(m_drivers.GetCurSel());
-}
-
-BOOL VideoDriverSelect::OnInitDialog()
-{
- CDialog::OnInitDialog();
-
- for(int i = 0; i < gDriverCnt; i++) {
- m_drivers.AddString(Drivers[i].szDescription);
- }
-
- GetDlgItem(ID_OK)->EnableWindow(FALSE);
- CenterWindow();
-
- return TRUE; // return TRUE unless you set the focus to a control
- // EXCEPTION: OCX Property Pages should return FALSE
-}
-
-void VideoDriverSelect::OnSelchangeDrivers()
-{
- GetDlgItem(ID_OK)->EnableWindow(m_drivers.GetCurSel() != -1);
-}
diff --git a/src/win32/VideoMode.h b/src/win32/VideoMode.h
deleted file mode 100644
index 6b359f51..00000000
--- a/src/win32/VideoMode.h
+++ /dev/null
@@ -1,102 +0,0 @@
-// -*- 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.
-
-#if !defined(AFX_VIDEOMODE_H__074B2426_32EA_4D69_9215_AB5E90F885D0__INCLUDED_)
-#define AFX_VIDEOMODE_H__074B2426_32EA_4D69_9215_AB5E90F885D0__INCLUDED_
-
-#if _MSC_VER > 1000
-#pragma once
-#endif // _MSC_VER > 1000
-// VideoMode.h : header file
-//
-
-/////////////////////////////////////////////////////////////////////////////
-// VideoMode dialog
-
-class VideoMode : public CDialog
-{
- // Construction
- public:
- VideoMode(LPDIRECTDRAW7 pDraw,CWnd* pParent = NULL); // standard constructor
-
- // Dialog Data
- //{{AFX_DATA(VideoMode)
- enum { IDD = IDD_MODES };
- CListBox m_modes;
- //}}AFX_DATA
-
-
- // Overrides
- // ClassWizard generated virtual function overrides
- //{{AFX_VIRTUAL(VideoMode)
- protected:
- virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
- //}}AFX_VIRTUAL
-
- // Implementation
- protected:
-
- // Generated message map functions
- //{{AFX_MSG(VideoMode)
- afx_msg void OnSelchangeModes();
- afx_msg void OnCancel();
- afx_msg void OnOk();
- virtual BOOL OnInitDialog();
- //}}AFX_MSG
- DECLARE_MESSAGE_MAP()
- private:
- LPDIRECTDRAW7 pDirectDraw;
-};
-
-/////////////////////////////////////////////////////////////////////////////
-// VideoDriverSelect dialog
-
-class VideoDriverSelect : public CDialog
-{
- // Construction
- public:
- VideoDriverSelect(CWnd* pParent = NULL); // standard constructor
-
- // Dialog Data
- //{{AFX_DATA(VideoDriverSelect)
- enum { IDD = IDD_DRIVERS };
- CListBox m_drivers;
- //}}AFX_DATA
-
-
- // Overrides
- // ClassWizard generated virtual function overrides
- //{{AFX_VIRTUAL(VideoDriverSelect)
- protected:
- virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
- //}}AFX_VIRTUAL
-
- // Implementation
- protected:
-
- // Generated message map functions
- //{{AFX_MSG(VideoDriverSelect)
- afx_msg void OnCancel();
- afx_msg void OnOk();
- virtual BOOL OnInitDialog();
- afx_msg void OnSelchangeDrivers();
- //}}AFX_MSG
- DECLARE_MESSAGE_MAP()
- };
-#endif // !defined(AFX_VIDEOMODE_H__074B2426_32EA_4D69_9215_AB5E90F885D0__INCLUDED_)