2018-11-15 23:31:39 +00:00
|
|
|
/*****************************************************************************\
|
|
|
|
Snes9x - Portable Super Nintendo Entertainment System (TM) emulator.
|
|
|
|
This file is licensed under the Snes9x License.
|
|
|
|
For further information, consult the LICENSE file in the root directory.
|
|
|
|
\*****************************************************************************/
|
2010-09-25 15:46:12 +00:00
|
|
|
|
|
|
|
#ifndef WIN32_DISPLAY_H
|
|
|
|
#define WIN32_DISPLAY_H
|
|
|
|
|
|
|
|
#include "wsnes9x.h"
|
|
|
|
#include "port.h"
|
|
|
|
#include "render.h"
|
|
|
|
#include <vector>
|
2023-02-01 20:47:42 +00:00
|
|
|
#include <functional>
|
2010-09-25 15:46:12 +00:00
|
|
|
|
2010-09-25 15:52:32 +00:00
|
|
|
#define IsHiRes(x) ((x.Height > SNES_HEIGHT_EXTENDED || x.Width == 512))
|
|
|
|
#define CurrentScale (IsHiRes(Src) ? GUI.ScaleHiRes : GUI.Scale)
|
|
|
|
|
2016-10-08 21:07:02 +00:00
|
|
|
#define IS_SLASH(x) ((x) == TEXT('\\') || (x) == TEXT('/'))
|
|
|
|
|
2010-09-25 15:46:12 +00:00
|
|
|
void WinRefreshDisplay(void);
|
|
|
|
void S9xSetWinPixelFormat ();
|
|
|
|
void SwitchToGDI();
|
2010-09-25 17:35:19 +00:00
|
|
|
void SaveMainWinPos();
|
|
|
|
void RestoreMainWinPos();
|
2010-09-25 15:46:12 +00:00
|
|
|
void ToggleFullScreen ();
|
|
|
|
void RestoreGUIDisplay ();
|
|
|
|
void RestoreSNESDisplay ();
|
|
|
|
void WinChangeWindowSize(unsigned int newWidth, unsigned int newHeight);
|
|
|
|
bool WinDisplayReset(void);
|
|
|
|
void WinDisplayApplyChanges();
|
2010-09-25 17:35:19 +00:00
|
|
|
RECT CalculateDisplayRect(unsigned int sourceWidth,unsigned int sourceHeight,
|
|
|
|
unsigned int displayWidth,unsigned int displayHeight);
|
2010-09-25 15:46:12 +00:00
|
|
|
void WinEnumDisplayModes(std::vector<dMode> *modeVector);
|
|
|
|
void ConvertDepth (SSurface *src, SSurface *dst, RECT *srect);
|
2011-02-24 00:26:42 +00:00
|
|
|
char *ReadShaderFileContents(const TCHAR *filename);
|
2016-10-08 21:07:02 +00:00
|
|
|
void ReduceToPath(TCHAR *filename);
|
2018-05-24 23:52:43 +00:00
|
|
|
double WinGetRefreshRate();
|
2023-05-04 22:36:36 +00:00
|
|
|
void S9xWinDisplayString(const char*, int, int, bool, int);
|
2018-05-24 23:52:43 +00:00
|
|
|
int WinGetAutomaticInputRate();
|
2023-02-23 23:20:35 +00:00
|
|
|
void WinThrottleFramerate();
|
2023-03-11 20:49:10 +00:00
|
|
|
std::vector<ShaderParam> *WinGetShaderParameters();
|
2023-02-01 20:47:42 +00:00
|
|
|
std::function<void(const char*)> WinGetShaderSaveFunction();
|
2010-09-25 15:46:12 +00:00
|
|
|
|
2010-09-25 17:35:19 +00:00
|
|
|
#endif
|