[c-host] fix NvFBC build after moving headers

This commit is contained in:
Geoffrey McRae 2019-04-11 17:15:17 +10:00
parent 32bd6d96e3
commit 8cedad8241
7 changed files with 21 additions and 5 deletions

View File

@ -1 +1 @@
a12-153-g611216286e+1
a12-154-g32bd6d96e3+1

View File

@ -25,6 +25,7 @@ int app_main();
void app_quit();
// these must be implemented for each OS
const char * os_getExecutable();
unsigned int os_shmemSize();
bool os_shmemMmap(void **ptr);

View File

@ -33,6 +33,7 @@ Place, Suite 330, Boston, MA 02111-1307 USA
struct app
{
const char * executable;
unsigned int shmSize;
int shmFD;
void * shmMap;
@ -67,6 +68,8 @@ void sigHandler(int signo)
int main(int argc, char * argv[])
{
app.executable = argv[0];
static struct option longOptions[] =
{
{"shmDevice", required_argument, 0, 'f'},
@ -177,6 +180,11 @@ int main(int argc, char * argv[])
return result;
}
const char * os_getExecutable()
{
return app.executable;
}
unsigned int os_shmemSize()
{
return app.shmSize;

View File

@ -20,7 +20,7 @@ Place, Suite 330, Boston, MA 02111-1307 USA
#include "interface/capture.h"
#include "interface/platform.h"
#include "windows/platform.h"
#include "windows/windebug.h"
#include "windows/debug.h"
#include "windows/mousehook.h"
#include <assert.h>
#include <stdlib.h>

View File

@ -18,8 +18,7 @@ Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "wrapper.h"
#include "debug.h"
#include "windows/windebug.h"
#include "windows/debug.h"
#include <windows.h>
#include <NvFBC/nvFBCToSys.h>

View File

@ -28,6 +28,7 @@ Place, Suite 330, Boston, MA 02111-1307 USA
#include "windows/debug.h"
#include "ivshmem/Public.h"
static char executable[MAX_PATH + 1];
static HANDLE shmemHandle = INVALID_HANDLE_VALUE;
static bool shmemOwned = false;
static IVSHMEM_MMAP shmemMap = {0};
@ -99,6 +100,8 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine
PSP_DEVICE_INTERFACE_DETAIL_DATA infData = NULL;
SP_DEVICE_INTERFACE_DATA deviceInterfaceData;
GetModuleFileName(NULL, executable, sizeof(executable));
// redirect stderr to a file
{
char tempPath[MAX_PATH+1];
@ -224,6 +227,11 @@ finish:
return result;
}
const char * os_getExecutable()
{
return executable;
}
unsigned int os_shmemSize()
{
IVSHMEM_SIZE size;

View File

@ -258,7 +258,7 @@ static bool captureRestart()
int app_main()
{
if (!installCrashHandler())
if (!installCrashHandler(os_getExecutable()))
DEBUG_WARN("Failed to install the crash handler");
unsigned int shmemSize = os_shmemSize();