Build fixes for Qt windows chm help file loader.
This commit is contained in:
parent
90d8dbd411
commit
f8b6d19a94
|
@ -34,7 +34,7 @@ if(WIN32)
|
|||
include_directories( ${CMAKE_CURRENT_SOURCE_DIR}/drivers/win/zlib )
|
||||
set( OPENGL_LDFLAGS OpenGL::GL )
|
||||
set( SDL2_LDFLAGS ${SDL_INSTALL_PREFIX}/SDL2/lib/x64/SDL2.lib )
|
||||
set( SYS_LIBS wsock32 ws2_32 vfw32 )
|
||||
set( SYS_LIBS wsock32 ws2_32 vfw32 Htmlhelp )
|
||||
set(APP_ICON_RESOURCES_WINDOWS ${CMAKE_SOURCE_DIR}/icons/fceux.rc )
|
||||
else(WIN32)
|
||||
# Non Windows System
|
||||
|
|
|
@ -2,20 +2,29 @@
|
|||
|
||||
#include <string>
|
||||
|
||||
#include "driver.h"
|
||||
#include "Qt/HelpPages.h"
|
||||
#include "Qt/ConsoleWindow.h"
|
||||
|
||||
#ifdef WIN32
|
||||
#include <Windows.h>
|
||||
#include <htmlhelp.h>
|
||||
|
||||
void OpenHelpWindow(std::string subpage)
|
||||
{
|
||||
std::string helpFileName = BaseDirectory;
|
||||
helpFileName += "\\fceux.chm";
|
||||
HWND helpWin;
|
||||
std::string helpFileName = FCEUI_GetBaseDirectory();
|
||||
helpFileName += "\\..\\doc\\fceux.chm";
|
||||
if (subpage.length() > 0)
|
||||
{
|
||||
helpFileName = helpFileName + "::/" + subpage + ".htm";
|
||||
}
|
||||
HtmlHelp(GetDesktopWindow(), helpFileName.c_str(), HH_DISPLAY_TOPIC, (DWORD)NULL);
|
||||
//printf("Looking for HelpFile '%s'\n", helpFileName.c_str() );
|
||||
helpWin = HtmlHelp( HWND(consoleWindow->winId()), helpFileName.c_str(), HH_DISPLAY_TOPIC, (DWORD)NULL);
|
||||
if ( helpWin == NULL )
|
||||
{
|
||||
printf("Error: Failed to open help file '%s'\n", helpFileName.c_str() );
|
||||
}
|
||||
}
|
||||
|
||||
#else
|
||||
|
|
Loading…
Reference in New Issue