Main.cpp 647 B

12345678910111213141516
  1. #include "PrecompiledHeader.h"
  2. #include "..\UnityPlayerStub\Exports.h"
  3. // Hint that the discrete gpu should be enabled on optimus/enduro systems
  4. // NVIDIA docs: http://developer.download.nvidia.com/devzone/devcenter/gamegraphics/files/OptimusRenderingPolicies.pdf
  5. // AMD forum post: http://devgurus.amd.com/thread/169965
  6. extern "C"
  7. {
  8. __declspec(dllexport) DWORD NvOptimusEnablement = 0x00000001;
  9. __declspec(dllexport) int AmdPowerXpressRequestHighPerformance = 1;
  10. }
  11. int WINAPI wWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPWSTR lpCmdLine, int nShowCmd)
  12. {
  13. return UnityMain(hInstance, hPrevInstance, lpCmdLine, nShowCmd);
  14. }