revert r3037 (video-related 'refactors'). seemed to go ok, didnt touch as much stuff as the input-related stuff)
This commit is contained in:
parent
f19171451e
commit
efa98aafe3
|
@ -25,9 +25,6 @@ void FCEU_printf(char *format, ...);
|
|||
#define FCEUI_printf FCEU_printf
|
||||
|
||||
//Video interface
|
||||
// FIXME: these functions are declared in windows video driver header, but not in linux video driver header;
|
||||
// eventually both platform video drivers should be brought to same set of functions and single shared header,
|
||||
// which then can be included where access to video driver functions is needed instead of driver.h
|
||||
void FCEUD_SetPalette(uint8 index, uint8 r, uint8 g, uint8 b);
|
||||
void FCEUD_GetPalette(uint8 i,uint8 *r, uint8 *g, uint8 *b);
|
||||
|
||||
|
@ -262,9 +259,6 @@ void FCEUI_SetEmulationPaused(int val);
|
|||
void FCEUI_ToggleEmulationPause();
|
||||
|
||||
//indicates whether input aids should be drawn (such as crosshairs, etc; usually in fullscreen mode)
|
||||
// FIXME: this function is already declared in both platform video driver headers;
|
||||
// eventually both platform video drivers should be brought to same set of functions and single shared header,
|
||||
// which then can be included where access to video driver functions is needed instead of driver.h
|
||||
bool FCEUD_ShouldDrawInputAids();
|
||||
|
||||
///called when the emulator closes a game
|
||||
|
|
|
@ -4,8 +4,8 @@
|
|||
|
||||
#include "common.h"
|
||||
#include "fceu.h"
|
||||
#include "drivers/win/video.h"
|
||||
|
||||
extern PALETTEENTRY *color_palette;
|
||||
//extern WAVEFORMATEX wf;
|
||||
//extern int soundo;
|
||||
|
||||
|
@ -292,7 +292,6 @@ static void do_video_conversion(const unsigned char* buffer)
|
|||
// memset(avi_file->convert_buffer, 0, VIDEO_WIDTH*(avi_file->end_scanline-avi_file->start_scanline)*3);
|
||||
|
||||
buffer += avi_file->start_scanline * VIDEO_WIDTH;
|
||||
PALETTEENTRY* color_palette = GetPalette();
|
||||
|
||||
for(int y=avi_file->start_scanline; y<avi_file->end_scanline; ++y)
|
||||
{
|
||||
|
|
|
@ -185,8 +185,8 @@ static CFGSTRUCT fceuconfig[] =
|
|||
|
||||
NAC("palyo",pal_emulation),
|
||||
NAC("genie",genie),
|
||||
NAC("fs",_FIXME_getFullscreenVar()),
|
||||
NAC("vgamode",_FIXME_getVModeIdxVar()),
|
||||
NAC("fs",fullscreen),
|
||||
NAC("vgamode",vmod),
|
||||
NAC("sound",soundo),
|
||||
NAC("sicon",status_icon),
|
||||
|
||||
|
@ -206,8 +206,8 @@ static CFGSTRUCT fceuconfig[] =
|
|||
NACS("odavi",directory_names[12]),
|
||||
NACS("odbase",directory_names[13]),
|
||||
|
||||
NAC("winspecial", _FIXME_getFilterModeWindowedIdxVar()),
|
||||
NAC("NTSCwinspecial", _FIXME_getFilterOptionVar()),
|
||||
AC(winspecial),
|
||||
AC(NTSCwinspecial),
|
||||
AC(winsizemulx),
|
||||
AC(winsizemuly),
|
||||
AC(tvAspectX),
|
||||
|
@ -231,23 +231,23 @@ static CFGSTRUCT fceuconfig[] =
|
|||
|
||||
NACA("InputType",InputType),
|
||||
|
||||
NAC("vmcx",_FIXME_getCustomVideoModeVar().width),
|
||||
NAC("vmcy",_FIXME_getCustomVideoModeVar().height),
|
||||
NAC("vmcb",_FIXME_getCustomVideoModeVar().bpp),
|
||||
NAC("vmcf",_FIXME_getCustomVideoModeVar().flags),
|
||||
NAC("vmcxs",_FIXME_getCustomVideoModeVar().xscale),
|
||||
NAC("vmcys",_FIXME_getCustomVideoModeVar().yscale),
|
||||
NAC("vmspecial",_FIXME_getCustomVideoModeVar().filter),
|
||||
NAC("vmcx",vmodes[0].x),
|
||||
NAC("vmcy",vmodes[0].y),
|
||||
NAC("vmcb",vmodes[0].bpp),
|
||||
NAC("vmcf",vmodes[0].flags),
|
||||
NAC("vmcxs",vmodes[0].xscale),
|
||||
NAC("vmcys",vmodes[0].yscale),
|
||||
NAC("vmspecial",vmodes[0].special),
|
||||
|
||||
NAC("srendline",srendlinen),
|
||||
NAC("erendline",erendlinen),
|
||||
NAC("srendlinep",srendlinep),
|
||||
NAC("erendlinep",erendlinep),
|
||||
|
||||
NAC("directDrawModeWindowed", _FIXME_getDDrawModeWindowedVar()),
|
||||
NAC("directDrawModeFullscreen", _FIXME_getDDrawModeFullscreenVar()),
|
||||
NAC("winsync", _FIXME_getWindowedSyncModeIdxVar()),
|
||||
NAC("988fssync",_FIXME_getFullscreenSyncModeIdxVar()),
|
||||
AC(directDrawModeWindowed),
|
||||
AC(directDrawModeFullscreen),
|
||||
AC(winsync),
|
||||
NAC("988fssync",fssync),
|
||||
|
||||
AC(ismaximized),
|
||||
AC(maxconbskip),
|
||||
|
|
|
@ -1,7 +1,3 @@
|
|||
// FIXME for Windows, make use of Config class the way linux version does
|
||||
// old config registers variables by placing their addresses into static array, which makes
|
||||
// many modules expose their internal vars and pollute globals; there is also no way to know when a
|
||||
// setting was changed by it, which spawns auxillary functions intended to push new values through
|
||||
void SaveConfig(const char *filename);
|
||||
void LoadConfig(const char *filename);
|
||||
|
||||
|
|
|
@ -28,7 +28,6 @@
|
|||
#include <windows.h>
|
||||
#include <commctrl.h>
|
||||
|
||||
#include "video.h"
|
||||
#include "input.h"
|
||||
#include "keyboard.h"
|
||||
#include "joystick.h"
|
||||
|
@ -43,8 +42,9 @@ LPDIRECTINPUT7 lpDI=0;
|
|||
|
||||
void InitInputPorts(bool fourscore);
|
||||
|
||||
VSYNCMODE tempwinsync = SYNCMODE_NONE; //Temp variable used by turbo to turn of sync settings
|
||||
int tempwinsync = 0; //Temp variable used by turbo to turn of sync settings
|
||||
int tempsoundquality = 0; //Temp variable used by turbo to turn of sound quality settings
|
||||
extern int winsync;
|
||||
extern int soundquality;
|
||||
extern bool replaceP2StartWithMicrophone;
|
||||
//UsrInputType[] is user-specified. InputType[] is current
|
||||
|
@ -1575,8 +1575,8 @@ int FCEUD_TestCommandState(int c)
|
|||
|
||||
void FCEUD_TurboOn (void)
|
||||
{
|
||||
tempwinsync = GetWindowedSyncModeIdx(); //Store wndSyncMode setting
|
||||
SetWindowedSyncModeIdx(SYNCMODE_NONE); //turn off wndSyncMode for turbo (so that turbo can function even with VBlank sync methods
|
||||
tempwinsync = winsync; //Store winsync setting
|
||||
winsync = 0; //turn off winsync for turbo (so that turbo can function even with VBlank sync methods
|
||||
tempsoundquality = soundquality; //Store sound quality settings
|
||||
FCEUI_SetSoundQuality(0); //Turn sound quality to low
|
||||
turbo = true;
|
||||
|
@ -1584,7 +1584,7 @@ void FCEUD_TurboOn (void)
|
|||
}
|
||||
void FCEUD_TurboOff (void)
|
||||
{
|
||||
SetWindowedSyncModeIdx(tempwinsync); //Restore wndSyncMode setting
|
||||
winsync = tempwinsync; //Restore winsync setting
|
||||
soundquality = tempsoundquality; //Restore sound quality settings
|
||||
FCEUI_SetSoundQuality(soundquality);
|
||||
turbo = false;
|
||||
|
@ -1593,15 +1593,15 @@ void FCEUD_TurboOff (void)
|
|||
void FCEUD_TurboToggle(void)
|
||||
{
|
||||
if (turbo) {
|
||||
SetWindowedSyncModeIdx(tempwinsync); //If turbo was on, restore wndSyncMode
|
||||
winsync = tempwinsync; //If turbo was on, restore winsync
|
||||
soundquality = tempsoundquality; //and restore sound quality setting
|
||||
FCEUI_SetSoundQuality(soundquality);
|
||||
}
|
||||
else
|
||||
{
|
||||
tempwinsync = GetWindowedSyncModeIdx(); //Store video sync settings
|
||||
tempwinsync = winsync; //Store video sync settings
|
||||
tempsoundquality = soundquality; //Store sound quality settings
|
||||
SetWindowedSyncModeIdx(SYNCMODE_NONE); //If turbo was off, turn off wndSyncMode (so that turbo can function even with VBlank sync methods
|
||||
winsync = 0; //If turbo was off, turn off winsync (so that turbo can function even with VBlank sync methods
|
||||
FCEUI_SetSoundQuality(0); //Set sound quality to low
|
||||
}
|
||||
|
||||
|
|
|
@ -19,7 +19,7 @@ int InitDInput(void);
|
|||
void CreateInputStuff(void);
|
||||
void InitInputStuff(void);
|
||||
void DestroyInput(void);
|
||||
void InputScreenChanged(int fs); // FIXME defined nowhere used nowhere
|
||||
void InputScreenChanged(int fs);
|
||||
void SetAutoFireDesynch(int DesynchOn);
|
||||
int GetAutoFireDesynch();
|
||||
uint32 GetGamepadPressedImmediate();
|
||||
|
|
|
@ -43,7 +43,6 @@
|
|||
#include "../../movie.h"
|
||||
#include "../../fceulua.h"
|
||||
|
||||
#include "window.h"
|
||||
#include "archive.h"
|
||||
#include "input.h"
|
||||
#include "netplay.h"
|
||||
|
@ -110,6 +109,7 @@ extern bool taseditorEnableAcceleratorKeys;
|
|||
// External functions
|
||||
extern std::string cfgFile; //Contains the filename of the config file used.
|
||||
extern bool turbo; //Is game in turbo mode?
|
||||
void ResetVideo(void);
|
||||
void ShowCursorAbs(int w);
|
||||
void HideFWindow(int h);
|
||||
void FixWXY(int pref, bool shift_held);
|
||||
|
@ -167,12 +167,15 @@ int ffbskip = 32; //Blit skips per blit when FF-ing
|
|||
HINSTANCE fceu_hInstance;
|
||||
HACCEL fceu_hAccel;
|
||||
|
||||
HRESULT ddrval;
|
||||
|
||||
static char TempArray[2048];
|
||||
|
||||
static int exiting = 0;
|
||||
static volatile int moocow = 0;
|
||||
|
||||
int windowedfailed = 0;
|
||||
int fullscreen = 0; //Windows files only, variable that keeps track of fullscreen status
|
||||
|
||||
static volatile int _userpause = 0; //mbg merge 7/18/06 changed tasbuild was using this only in a couple of places
|
||||
|
||||
|
@ -387,12 +390,12 @@ void FCEUD_PrintError(const char *errormsg)
|
|||
{
|
||||
AddLogText(errormsg, 1);
|
||||
|
||||
if (GetIsFullscreen() && (eoptions & EO_HIDEMOUSE))
|
||||
if (fullscreen && (eoptions & EO_HIDEMOUSE))
|
||||
ShowCursorAbs(1);
|
||||
|
||||
MessageBox(0, errormsg, FCEU_NAME" Error", MB_ICONERROR | MB_OK | MB_SETFOREGROUND | MB_TOPMOST);
|
||||
|
||||
if (GetIsFullscreen() && (eoptions & EO_HIDEMOUSE))
|
||||
if (fullscreen && (eoptions & EO_HIDEMOUSE))
|
||||
ShowCursorAbs(0);
|
||||
}
|
||||
|
||||
|
@ -488,7 +491,7 @@ int DriverInitialize()
|
|||
if(soundo)
|
||||
soundo = InitSound();
|
||||
|
||||
InitVideoDriver();
|
||||
SetVideoMode(fullscreen);
|
||||
InitInputStuff(); /* Initialize DInput interfaces. */
|
||||
|
||||
return 1;
|
||||
|
@ -503,7 +506,7 @@ static void DriverKill(void)
|
|||
|
||||
DestroyInput();
|
||||
|
||||
ShutdownVideoDriver();
|
||||
ResetVideo();
|
||||
|
||||
if(soundo)
|
||||
{
|
||||
|
@ -646,6 +649,7 @@ int main(int argc,char *argv[])
|
|||
{
|
||||
FCEUI_SetGameGenie(genie!=0);
|
||||
|
||||
fullscreen = !!fullscreen;
|
||||
soundo = !!soundo;
|
||||
frame_display = !!frame_display;
|
||||
allowUDLR = !!allowUDLR;
|
||||
|
@ -683,7 +687,7 @@ int main(int argc,char *argv[])
|
|||
|
||||
if(!t)
|
||||
{
|
||||
SetIsFullscreen(false);
|
||||
fullscreen=0;
|
||||
}
|
||||
|
||||
CreateMainWindow();
|
||||
|
@ -915,10 +919,8 @@ void FCEUD_Update(uint8 *XBuf, int32 *Buffer, int Count)
|
|||
}
|
||||
|
||||
//blit the framebuffer
|
||||
if(XBuf) {
|
||||
xbsave = XBuf;
|
||||
if(XBuf)
|
||||
FCEUD_BlitScreen(XBuf);
|
||||
}
|
||||
|
||||
//update debugging displays
|
||||
_updateWindow();
|
||||
|
|
|
@ -34,6 +34,7 @@ extern int maxconbskip;
|
|||
extern int ffbskip;
|
||||
extern void LoadNewGamey(HWND hParent, const char *initialdir);
|
||||
extern void CloseGame();
|
||||
extern int fullscreen; //Windows files only, keeps track of fullscreen status
|
||||
|
||||
// Flag that indicates whether Game Genie is enabled or not.
|
||||
extern int genie;
|
||||
|
@ -54,6 +55,8 @@ extern int AFon;
|
|||
extern int AFoff;
|
||||
extern int AutoFireOffset;
|
||||
|
||||
extern int vmod;
|
||||
|
||||
extern char* directory_names[14];
|
||||
|
||||
char *GetRomName(); //Checks if rom is loaded, if so, outputs the Rom name with no directory path or file extension
|
||||
|
@ -120,13 +123,13 @@ extern int soundo;
|
|||
extern int eoptions;
|
||||
extern int soundoptions;
|
||||
extern uint8 *xbsave;
|
||||
extern HRESULT ddrval;
|
||||
extern int windowedfailed;
|
||||
extern uint32 goptions;
|
||||
|
||||
void DoFCEUExit();
|
||||
void ShowAboutBox();
|
||||
int BlockingCheck();
|
||||
void UpdateRendBounds(void);
|
||||
void DoPriority();
|
||||
void RemoveDirs();
|
||||
void CreateDirs();
|
||||
|
|
|
@ -22,7 +22,6 @@ Main - Main gate between emulator and Taseditor
|
|||
#include "main.h" // for GetRomName
|
||||
#include "taseditor.h"
|
||||
#include "window.h"
|
||||
#include "video.h"
|
||||
#include "../../input.h"
|
||||
#include "../keyboard.h"
|
||||
#include "../joystick.h"
|
||||
|
@ -57,6 +56,7 @@ extern int joysticksPerFrame[INPUT_TYPES_TOTAL];
|
|||
extern bool turbo;
|
||||
extern int pal_emulation;
|
||||
extern int newppu;
|
||||
extern void PushCurrentVideoSettings();
|
||||
extern void RefreshThrottleFPS();
|
||||
extern bool LoadFM2(MovieData& movieData, EMUFILE* fp, int size, bool stopAfterHeader);
|
||||
// temporarily saved FCEUX config
|
||||
|
@ -883,6 +883,7 @@ void applyMovieInputConfig()
|
|||
pal_emulation = currMovieData.palFlag;
|
||||
FCEUI_SetVidSystem(pal_emulation);
|
||||
RefreshThrottleFPS();
|
||||
PushCurrentVideoSettings();
|
||||
// update PPU type
|
||||
newppu = currMovieData.PPUflag;
|
||||
SetMainWindowText();
|
||||
|
|
|
@ -19,8 +19,6 @@ Popup display - Manager of popup windows
|
|||
#include "taseditor_project.h"
|
||||
#include "zlib.h"
|
||||
|
||||
#include "drivers/win/video.h"
|
||||
|
||||
extern TASEDITOR_CONFIG taseditorConfig;
|
||||
extern TASEDITOR_WINDOW taseditorWindow;
|
||||
extern BOOKMARKS bookmarks;
|
||||
|
@ -93,7 +91,7 @@ void POPUP_DISPLAY::init()
|
|||
{
|
||||
free();
|
||||
// fill scr_bmp palette with current palette colors
|
||||
PALETTEENTRY* color_palette = GetPalette();
|
||||
extern PALETTEENTRY *color_palette;
|
||||
for (int i = 0; i < 256; ++i)
|
||||
{
|
||||
screenshotBmi->bmiColors[i].rgbRed = color_palette[i].peRed;
|
||||
|
|
|
@ -46,6 +46,7 @@
|
|||
char *textToTrans; // buffer to hold the text that needs translating
|
||||
char *transText; //holds the translated text
|
||||
|
||||
extern void FCEUD_BlitScreen(uint8 *XBuf); //needed for pause, not sure where this is defined...
|
||||
//adelikat merge 7/1/08 - had to add these extern variables
|
||||
//------------------------------
|
||||
extern uint8 PALRAM[0x20];
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -1,96 +1,71 @@
|
|||
#ifndef WIN_VIDEO_H
|
||||
#define WIN_VIDEO_H
|
||||
|
||||
#include <Windows.h>
|
||||
#include "types.h"
|
||||
#include "common.h"
|
||||
|
||||
typedef enum
|
||||
// I like hacks.
|
||||
#define uint8 __UNO492032
|
||||
#include <winsock.h>
|
||||
#include "ddraw.h"
|
||||
#undef LPCWAVEFORMATEX
|
||||
#include "dsound.h"
|
||||
#include "dinput.h"
|
||||
#include <commctrl.h>
|
||||
#include <shlobj.h> // For directories configuration dialog.
|
||||
#undef uint8
|
||||
|
||||
#include "main.h"
|
||||
#include "window.h"
|
||||
|
||||
enum DIRECTDRAW_MODES
|
||||
{
|
||||
DIRECTDRAW_MODE_SOFTWARE = 0, // all features are emulated in software
|
||||
DIRECTDRAW_MODE_SURFACE_IN_RAM, // place offscreen surface in RAM rather than in VRAM; may or may not use hardware acceleration
|
||||
DIRECTDRAW_MODE_FULL, // use available hardware features, emulate the rest
|
||||
DIRECTDRAW_MODE_SOFTWARE,
|
||||
DIRECTDRAW_MODE_SURFACE_IN_RAM,
|
||||
DIRECTDRAW_MODE_FULL,
|
||||
// ...
|
||||
DIRECTDRAW_MODES_TOTAL
|
||||
} DIRECTDRAW_MODE;
|
||||
};
|
||||
|
||||
#define VIDEOMODEFLAG_DXBLT 1
|
||||
#define VIDEOMODEFLAG_STRFS 2
|
||||
#define VF_DDSTRETCHED 1
|
||||
|
||||
typedef enum
|
||||
{
|
||||
FILTER_NONE = 0,
|
||||
FILTER_HQ2X,
|
||||
FILTER_SCALE2X,
|
||||
FILTER_NTSC2X,
|
||||
FILTER_HQ3X,
|
||||
FILTER_SCALE3X
|
||||
} VFILTER;
|
||||
#define VEF_LOSTSURFACE 1
|
||||
#define VEF____INTERNAL 2
|
||||
|
||||
#define VMDF_DXBLT 1
|
||||
#define VMDF_STRFS 2
|
||||
|
||||
typedef struct {
|
||||
int width;
|
||||
int height;
|
||||
int x;
|
||||
int y;
|
||||
int bpp;
|
||||
int flags;
|
||||
int xscale;
|
||||
int yscale;
|
||||
RECT srcRect;
|
||||
RECT dstRect;
|
||||
VFILTER filter;
|
||||
} VideoMode;
|
||||
RECT srect;
|
||||
RECT drect;
|
||||
int special;
|
||||
} vmdef;
|
||||
|
||||
typedef enum {
|
||||
SYNCMODE_NONE = 0,
|
||||
SYNCMODE_WAIT,
|
||||
SYNCMODE_LAZYWAIT,
|
||||
SYNCMODE_DOUBLEBUF
|
||||
} VSYNCMODE;
|
||||
// left, top, right, bottom
|
||||
extern vmdef vmodes[11];
|
||||
extern int winspecial;
|
||||
extern int NTSCwinspecial;
|
||||
|
||||
void InitVideoDriver(void);
|
||||
void ShutdownVideoDriver();
|
||||
extern int directDrawModeWindowed;
|
||||
extern int directDrawModeFullscreen;
|
||||
|
||||
// Recalculate blit rectangle within window of given size
|
||||
void OnWindowSizeChange(int width, int height);
|
||||
extern int fssync;
|
||||
extern int winsync;
|
||||
|
||||
// Get current blit rectangle
|
||||
RECT GetActiveRect(void);
|
||||
|
||||
// Get driver palette
|
||||
PALETTEENTRY* GetPalette(void);
|
||||
|
||||
// Returns true when in fullscreen mode, false when in windowed
|
||||
bool GetIsFullscreen(void);
|
||||
|
||||
// Set fullscreen mode flag
|
||||
// FCEUD_VideoChanged() must be called in order to make value take effect
|
||||
void SetIsFullscreen(bool f);
|
||||
|
||||
VSYNCMODE GetWindowedSyncModeIdx(void);
|
||||
void SetWindowedSyncModeIdx(VSYNCMODE idx);
|
||||
|
||||
|
||||
// Bring up the Video configuration dialog
|
||||
void ShowConfigVideoDialog();
|
||||
|
||||
// (Re)apply render lines and sprite limitation to FCE
|
||||
void DoVideoConfigFix();
|
||||
|
||||
|
||||
// Implements FCEUD requirements
|
||||
bool FCEUD_ShouldDrawInputAids(void);
|
||||
void SetFSVideoMode();
|
||||
void FCEUD_BlitScreen(uint8 *XBuf);
|
||||
void FCEUD_VideoChanged(void); // this one should be declared here
|
||||
void FCEUD_SetPalette(unsigned char index, unsigned char r, unsigned char g, unsigned char b);
|
||||
void FCEUD_GetPalette(unsigned char i, unsigned char *r, unsigned char *g, unsigned char *b);
|
||||
|
||||
|
||||
// see win/config.h
|
||||
bool& _FIXME_getFullscreenVar(void);
|
||||
int& _FIXME_getVModeIdxVar(void);
|
||||
VSYNCMODE& _FIXME_getFullscreenSyncModeIdxVar(void);
|
||||
VSYNCMODE& _FIXME_getWindowedSyncModeIdxVar(void);
|
||||
VFILTER& _FIXME_getFilterModeWindowedIdxVar(void);
|
||||
int& _FIXME_getFilterOptionVar(void);
|
||||
DIRECTDRAW_MODE& _FIXME_getDDrawModeWindowedVar(void);
|
||||
DIRECTDRAW_MODE& _FIXME_getDDrawModeFullscreenVar(void);
|
||||
VideoMode& _FIXME_getCustomVideoModeVar(void);
|
||||
void ConfigVideo();
|
||||
void recalculateBestFitRect(int width, int height);
|
||||
int SetVideoMode(int fs);
|
||||
void DoVideoConfigFix();
|
||||
void FCEUD_BlitScreen(uint8 *XBuf);
|
||||
void ResetVideo();
|
||||
void SetFSVideoMode();
|
||||
void PushCurrentVideoSettings();
|
||||
void ResetCustomMode();
|
||||
#endif
|
||||
|
|
|
@ -83,6 +83,8 @@ extern PLAYBACK playback;
|
|||
#include "Win32InputBox.h"
|
||||
extern int32 fps_scale_unpaused;
|
||||
|
||||
//extern void ToggleFullscreen();
|
||||
|
||||
using namespace std;
|
||||
|
||||
//----Context Menu - Some dynamically added menu items
|
||||
|
@ -993,7 +995,7 @@ void HideFWindow(int h)
|
|||
//Toggles the display status of the main menu.
|
||||
void ToggleHideMenu(void)
|
||||
{
|
||||
if(!GetIsFullscreen() && !nofocus && (GameInfo || tog))
|
||||
if(!fullscreen && !nofocus && (GameInfo || tog))
|
||||
{
|
||||
tog ^= 1;
|
||||
HideMenu(tog);
|
||||
|
@ -1032,7 +1034,7 @@ bool ALoad(const char *nameo, char* innerFilename, bool silent)
|
|||
|
||||
UpdateCheckedMenuItems();
|
||||
|
||||
FCEUD_VideoChanged();
|
||||
PushCurrentVideoSettings();
|
||||
|
||||
std::string recentFileName = nameo;
|
||||
if(GameInfo->archiveFilename && GameInfo->archiveCount>1)
|
||||
|
@ -1051,10 +1053,7 @@ bool ALoad(const char *nameo, char* innerFilename, bool silent)
|
|||
|
||||
if(eoptions & EO_FSAFTERLOAD)
|
||||
{
|
||||
changerecursive=1;
|
||||
SetIsFullscreen(true);
|
||||
FCEUD_VideoChanged();
|
||||
changerecursive=0;
|
||||
SetFSVideoMode();
|
||||
}
|
||||
|
||||
|
||||
|
@ -1120,7 +1119,7 @@ void LoadNewGamey(HWND hParent, const char *initialdir)
|
|||
|
||||
void GetMouseData(uint32 (&md)[3])
|
||||
{
|
||||
RECT bestfitRect = GetActiveRect();
|
||||
extern RECT bestfitRect;
|
||||
|
||||
double screen_width = VNSWID;
|
||||
double screen_height = FSettings.TotalScanlines();
|
||||
|
@ -1272,10 +1271,8 @@ LRESULT FAR PASCAL AppWndProc(HWND hWnd,UINT msg,WPARAM wParam,LPARAM lParam)
|
|||
{
|
||||
if (fullscreenByDoubleclick)
|
||||
{
|
||||
changerecursive=1;
|
||||
SetIsFullscreen(!GetIsFullscreen());
|
||||
FCEUD_VideoChanged();
|
||||
changerecursive=0;
|
||||
extern void ToggleFullscreen();
|
||||
ToggleFullscreen();
|
||||
return 0;
|
||||
} else
|
||||
{
|
||||
|
@ -1382,7 +1379,7 @@ LRESULT FAR PASCAL AppWndProc(HWND hWnd,UINT msg,WPARAM wParam,LPARAM lParam)
|
|||
goto proco;
|
||||
|
||||
case WM_SIZE:
|
||||
if (!GetIsFullscreen() && !changerecursive && !windowedfailed)
|
||||
if (!fullscreen && !changerecursive && !windowedfailed)
|
||||
{
|
||||
switch(wParam)
|
||||
{
|
||||
|
@ -1442,7 +1439,7 @@ LRESULT FAR PASCAL AppWndProc(HWND hWnd,UINT msg,WPARAM wParam,LPARAM lParam)
|
|||
//break;
|
||||
goto proco;
|
||||
case WM_DISPLAYCHANGE:
|
||||
if(!GetIsFullscreen() && !changerecursive)
|
||||
if(!fullscreen && !changerecursive)
|
||||
vchanged=1;
|
||||
goto proco;
|
||||
case WM_DROPFILES:
|
||||
|
@ -1973,7 +1970,7 @@ LRESULT FAR PASCAL AppWndProc(HWND hWnd,UINT msg,WPARAM wParam,LPARAM lParam)
|
|||
FCEUI_SetVidSystem(pal_emulation);
|
||||
RefreshThrottleFPS();
|
||||
UpdateCheckedMenuItems();
|
||||
FCEUD_VideoChanged();
|
||||
PushCurrentVideoSettings();
|
||||
break;
|
||||
case MENU_DIRECTORIES:
|
||||
ConfigDirectories();
|
||||
|
@ -1997,7 +1994,7 @@ LRESULT FAR PASCAL AppWndProc(HWND hWnd,UINT msg,WPARAM wParam,LPARAM lParam)
|
|||
ConfigTiming();
|
||||
break;
|
||||
case MENU_VIDEO:
|
||||
ShowConfigVideoDialog();
|
||||
ConfigVideo();
|
||||
break;
|
||||
case MENU_HOTKEYS:
|
||||
MapInput();
|
||||
|
@ -2295,14 +2292,14 @@ LRESULT FAR PASCAL AppWndProc(HWND hWnd,UINT msg,WPARAM wParam,LPARAM lParam)
|
|||
{
|
||||
if(GameInfo && ((InputType[2]==SIFC_FKB) || (InputType[2]==SIFC_SUBORKB) || (InputType[2]==SIFC_PEC586KB)) && cidisabled)
|
||||
break;
|
||||
if(lParam == VK_RETURN || GetIsFullscreen() || tog) break;
|
||||
if(lParam == VK_RETURN || fullscreen || tog) break;
|
||||
}
|
||||
goto proco;
|
||||
case WM_SYSKEYDOWN:
|
||||
if(GameInfo && ((InputType[2]==SIFC_FKB) || (InputType[2]==SIFC_SUBORKB) || (InputType[2]==SIFC_PEC586KB)) && cidisabled)
|
||||
break; // Hopefully this won't break DInput...
|
||||
|
||||
if(GetIsFullscreen() || tog)
|
||||
if(fullscreen || tog)
|
||||
{
|
||||
if(wParam==VK_MENU)
|
||||
break;
|
||||
|
@ -2465,10 +2462,9 @@ void FixWXY(int pref, bool shift_held)
|
|||
|
||||
void UpdateFCEUWindow(void)
|
||||
{
|
||||
if(vchanged && !GetIsFullscreen() && !changerecursive && !nofocus)
|
||||
if(vchanged && !fullscreen && !changerecursive && !nofocus)
|
||||
{
|
||||
SetIsFullscreen(false);
|
||||
FCEUD_VideoChanged();
|
||||
SetVideoMode(0);
|
||||
vchanged = 0;
|
||||
}
|
||||
|
||||
|
@ -2609,13 +2605,11 @@ void SetMainWindowStuff()
|
|||
ShowWindow(hAppWnd, SW_SHOWNORMAL);
|
||||
}
|
||||
|
||||
// removed check for EO_BESTFIT flag
|
||||
// OnWindowSizeChange() now is a general purpose window resize handler on video driver side
|
||||
if (!windowedfailed)
|
||||
if (eoptions & EO_BESTFIT && !windowedfailed)
|
||||
{
|
||||
RECT client_recr;
|
||||
GetClientRect(hAppWnd, &client_recr);
|
||||
OnWindowSizeChange(client_recr.right - client_recr.left, client_recr.bottom - client_recr.top);
|
||||
recalculateBestFitRect(client_recr.right - client_recr.left, client_recr.bottom - client_recr.top);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2983,10 +2977,6 @@ void UpdateMenuHotkeys()
|
|||
ChangeMenuItemText(MENU_CDLOGGER, combined);
|
||||
}
|
||||
|
||||
bool GetIsFullscreenOnDoubleclick() {
|
||||
return fullscreenByDoubleclick;
|
||||
}
|
||||
|
||||
//This function is for the context menu item Save Movie As...
|
||||
//It gets a filename from the user then calls CreateMovie()
|
||||
void SaveMovieAs()
|
||||
|
|
|
@ -40,10 +40,6 @@ void GetMouseData(uint32 (&md)[3]);
|
|||
//void ChangeMenuItemText(int menuitem, string text);
|
||||
void UpdateMenuHotkeys();
|
||||
|
||||
// Returns true if fullscreen via double click is enabled
|
||||
// TODO: replace fullscreenByDoubleclick references with a call to this
|
||||
bool GetIsFullscreenOnDoubleclick(void);
|
||||
|
||||
template<int BUFSIZE>
|
||||
inline std::string GetDlgItemText(HWND hDlg, int nIDDlgItem) {
|
||||
char buf[BUFSIZE];
|
||||
|
|
|
@ -38,7 +38,6 @@
|
|||
|
||||
#ifdef WIN32
|
||||
#include "drivers/win/main.h"
|
||||
#include "drivers/win/video.h"
|
||||
#include "drivers/win/memwatch.h"
|
||||
#include "drivers/win/cheat.h"
|
||||
#include "drivers/win/debugger.h"
|
||||
|
@ -1182,13 +1181,15 @@ static void FCEUI_DoExit(void)
|
|||
void ToggleFullscreen()
|
||||
{
|
||||
#ifdef WIN32
|
||||
extern int SetVideoMode(int fs); //adelikat: Yeah, I know, hacky
|
||||
extern void UpdateCheckedMenuItems();
|
||||
|
||||
UpdateCheckedMenuItems();
|
||||
|
||||
changerecursive=1;
|
||||
SetIsFullscreen(!GetIsFullscreen());
|
||||
FCEUD_VideoChanged();
|
||||
|
||||
int oldmode = fullscreen;
|
||||
if(!SetVideoMode(oldmode ^ 1))
|
||||
SetVideoMode(oldmode);
|
||||
changerecursive=0;
|
||||
#endif
|
||||
}
|
||||
|
|
|
@ -47,7 +47,6 @@
|
|||
#include "drivers/win/main.h"
|
||||
#include "drivers/win/ram_search.h"
|
||||
#include "drivers/win/ramwatch.h"
|
||||
#include "drivers/win/video.h"
|
||||
#endif
|
||||
|
||||
#include <string>
|
||||
|
@ -244,11 +243,7 @@ static bool ReadStateChunk(EMUFILE* is, SFORMAT *sf, int size)
|
|||
|
||||
static int read_sfcpuc=0, read_snd=0;
|
||||
|
||||
#ifndef WIN32
|
||||
// included corresponding header on Windows, no longer needed
|
||||
// TODO do the same for SDL and remove declaration completely
|
||||
void FCEUD_BlitScreen(uint8 *XBuf); //mbg merge 7/17/06 YUCKY had to add
|
||||
#endif
|
||||
void UpdateFCEUWindow(void); //mbg merge 7/17/06 YUCKY had to add
|
||||
static bool ReadStateChunks(EMUFILE* is, int32 totalsize)
|
||||
{
|
||||
|
|
|
@ -1,10 +0,0 @@
|
|||
#ifndef BITFLAGS_H
|
||||
#define BITFLAGS_H
|
||||
|
||||
// Flag test / set / clear macros for convenience and clarity
|
||||
#define FL_TEST(var, mask) (var & mask)
|
||||
#define FL_SET(var, mask) (var |= mask)
|
||||
#define FL_CLEAR(var, mask) (var &= ~mask)
|
||||
#define FL_FROMBOOL(var, mask, b) (var = (b)? var|mask:var&(~mask))
|
||||
|
||||
#endif // BITFLAGS_H
|
Loading…
Reference in New Issue