2018-11-16 00:31:39 +01: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 17:46:12 +02:00
|
|
|
|
|
|
|
#ifndef WIN32_DISPLAY_H
|
|
|
|
#define WIN32_DISPLAY_H
|
|
|
|
|
|
|
|
#include "wsnes9x.h"
|
|
|
|
#include "port.h"
|
|
|
|
#include "render.h"
|
2019-02-01 22:41:29 +01:00
|
|
|
#include "../shaders/glsl.h"
|
2010-09-25 17:46:12 +02:00
|
|
|
#include <vector>
|
|
|
|
|
2010-09-25 17:52:32 +02:00
|
|
|
#define IsHiRes(x) ((x.Height > SNES_HEIGHT_EXTENDED || x.Width == 512))
|
|
|
|
#define CurrentScale (IsHiRes(Src) ? GUI.ScaleHiRes : GUI.Scale)
|
|
|
|
|
2016-10-08 23:07:02 +02:00
|
|
|
#define IS_SLASH(x) ((x) == TEXT('\\') || (x) == TEXT('/'))
|
|
|
|
|
2010-09-25 17:46:12 +02:00
|
|
|
void WinRefreshDisplay(void);
|
|
|
|
void S9xSetWinPixelFormat ();
|
|
|
|
void SwitchToGDI();
|
2010-09-25 19:35:19 +02:00
|
|
|
void SaveMainWinPos();
|
|
|
|
void RestoreMainWinPos();
|
2010-09-25 17:46:12 +02:00
|
|
|
void ToggleFullScreen ();
|
|
|
|
void RestoreGUIDisplay ();
|
|
|
|
void RestoreSNESDisplay ();
|
|
|
|
void WinChangeWindowSize(unsigned int newWidth, unsigned int newHeight);
|
|
|
|
bool WinDisplayReset(void);
|
|
|
|
void WinDisplayApplyChanges();
|
2010-09-25 19:35:19 +02:00
|
|
|
RECT CalculateDisplayRect(unsigned int sourceWidth,unsigned int sourceHeight,
|
|
|
|
unsigned int displayWidth,unsigned int displayHeight);
|
2010-09-25 17:46:12 +02:00
|
|
|
void WinEnumDisplayModes(std::vector<dMode> *modeVector);
|
|
|
|
void ConvertDepth (SSurface *src, SSurface *dst, RECT *srect);
|
|
|
|
void WinDisplayStringFromBottom (const char *string, int linesFromBottom, int pixelsFromLeft, bool allowWrap);
|
|
|
|
void WinSetCustomDisplaySurface(void *screen, int ppl, int width, int height, int scale);
|
|
|
|
template<typename screenPtrType>
|
|
|
|
void WinDisplayStringInBuffer (const char *string, int linesFromBottom, int pixelsFromLeft, bool allowWrap);
|
2011-02-24 01:26:42 +01:00
|
|
|
char *ReadShaderFileContents(const TCHAR *filename);
|
2016-10-08 23:07:02 +02:00
|
|
|
void ReduceToPath(TCHAR *filename);
|
2018-05-25 01:52:43 +02:00
|
|
|
double WinGetRefreshRate();
|
|
|
|
int WinGetAutomaticInputRate();
|
2019-02-01 22:41:29 +01:00
|
|
|
GLSLShader *WinGetActiveGLSLShader();
|
2010-09-25 17:46:12 +02:00
|
|
|
|
2010-09-25 19:35:19 +02:00
|
|
|
#endif
|