mirror of
https://github.com/gnif/LookingGlass.git
synced 2024-11-22 05:27:20 +00:00
[c-host] fix NvFBC build after moving headers
This commit is contained in:
parent
32bd6d96e3
commit
8cedad8241
@ -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);
|
||||
|
@ -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;
|
||||
|
@ -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>
|
||||
|
@ -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>
|
||||
|
||||
|
@ -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;
|
||||
|
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user