diff options
author | Nikolay Korolev <nickvnuk@gmail.com> | 2020-08-15 17:56:52 +0200 |
---|---|---|
committer | Nikolay Korolev <nickvnuk@gmail.com> | 2020-08-15 17:56:52 +0200 |
commit | 1d5e3c74256038c763bbe8d1369715bc47f99dd8 (patch) | |
tree | ee2a1dac538b95ddb92d7744a6821917e7dd3056 /src/skel/win/win.cpp | |
parent | submodules (diff) | |
parent | Don't react if player's targeting with melee (diff) | |
download | re3-1d5e3c74256038c763bbe8d1369715bc47f99dd8.tar re3-1d5e3c74256038c763bbe8d1369715bc47f99dd8.tar.gz re3-1d5e3c74256038c763bbe8d1369715bc47f99dd8.tar.bz2 re3-1d5e3c74256038c763bbe8d1369715bc47f99dd8.tar.lz re3-1d5e3c74256038c763bbe8d1369715bc47f99dd8.tar.xz re3-1d5e3c74256038c763bbe8d1369715bc47f99dd8.tar.zst re3-1d5e3c74256038c763bbe8d1369715bc47f99dd8.zip |
Diffstat (limited to 'src/skel/win/win.cpp')
-rw-r--r-- | src/skel/win/win.cpp | 26 |
1 files changed, 25 insertions, 1 deletions
diff --git a/src/skel/win/win.cpp b/src/skel/win/win.cpp index 5c5c7ece..a064788c 100644 --- a/src/skel/win/win.cpp +++ b/src/skel/win/win.cpp @@ -241,6 +241,23 @@ psCameraShowRaster(RwCamera *camera) /* ***************************************************************************** */ +RwImage * +psGrabScreen(RwCamera *pCamera) +{ +#ifndef LIBRW + RwRaster *pRaster = RwCameraGetRaster(pCamera); + if (RwImage *pImage = RwImageCreate(pRaster->width, pRaster->height, 32)) { + RwImageAllocatePixels(pImage); + RwImageSetFromRaster(pImage, pRaster); + return pImage; + } +#endif + return nil; +} + +/* + ***************************************************************************** + */ RwUInt32 psTimer(void) { @@ -1851,7 +1868,11 @@ void PlayMovieInWindow(int cmdShow, const char* szFile) MultiByteToWideChar(CP_ACP, 0, szFile, -1, wFileName, sizeof(wFileName) - 1); // Initialize COM +#ifdef FIX_BUGS // will also return S_FALSE if it has already been inited in the same thread + CoInitialize(nil); +#else JIF(CoInitialize(nil)); +#endif // Get the interface for DirectShow's GraphBuilder JIF(CoCreateInstance(CLSID_FilterGraph, nil, CLSCTX_INPROC, @@ -2223,9 +2244,10 @@ WinMain(HINSTANCE instance, case GS_INIT_INTRO_MPEG: { +#ifndef NO_MOVIES CloseClip(); - CoUninitialize(); +#endif if ( CMenuManager::OS_Language == LANG_FRENCH || CMenuManager::OS_Language == LANG_GERMAN ) PlayMovieInWindow(cmdShow, "movies\\GTAtitlesGER.mpg"); @@ -2259,8 +2281,10 @@ WinMain(HINSTANCE instance, case GS_INIT_ONCE: { +#ifndef NO_MOVIES CloseClip(); CoUninitialize(); +#endif #ifdef FIX_BUGS // draw one frame because otherwise we'll end up looking at black screen for a while if vsync is on |