Launcher_Game_Windows.cpp 1017 B

1234567891011121314151617181920212223242526
  1. /*
  2. * Copyright (c) Contributors to the Open 3D Engine Project.
  3. * For complete copyright and license terms please see the LICENSE at the root of this distribution.
  4. *
  5. * SPDX-License-Identifier: Apache-2.0 OR MIT
  6. *
  7. */
  8. typedef unsigned long DWORD;
  9. //Due to some laptops not auto-switching to the discrete GPU correctly we are adding these
  10. //__declspec as defined in the AMD and NVidia white papers to 'force on' the use of the
  11. //discrete chips. This will be overridden by users setting application profiles
  12. //and may not work on older drivers or bios. In theory this should be enough to always force on
  13. //the discrete chips.
  14. //http://developer.download.nvidia.com/devzone/devcenter/gamegraphics/files/OptimusRenderingPolicies.pdf
  15. //https://community.amd.com/thread/169965
  16. // It is unclear if this is also needed for Linux or macOS at this time (22/02/2017)
  17. extern "C"
  18. {
  19. __declspec(dllexport) int AmdPowerXpressRequestHighPerformance = 1;
  20. __declspec(dllexport) DWORD NvOptimusEnablement = 0x00000001;
  21. }