
.. _program_listing_file_Src_GraphicsEngineVulkan_app_AppExitCode.hpp:

Program Listing for File AppExitCode.hpp
========================================

|exhale_lsh| :ref:`Return to documentation for file <file_Src_GraphicsEngineVulkan_app_AppExitCode.hpp>` (``Src/GraphicsEngineVulkan/app/AppExitCode.hpp``)

.. |exhale_lsh| unicode:: U+021B0 .. UPWARDS ARROW WITH TIP LEFTWARDS

.. code-block:: cpp

   #pragma once
   
   #include <cstdlib>
   
   namespace Kataglyphis {
   // The process exit code for a completed App::run(): EXIT_FAILURE if the frame
   // loop aborted (device lost, or a fatal submit/sync failure that forced the
   // window closed), EXIT_SUCCESS otherwise. Free of Vulkan/GLFW types so it
   // links into a test with no device.
   constexpr int appExitCode(bool deviceLost, bool fatalFrameError)
   {
       return (deviceLost || fatalFrameError) ? EXIT_FAILURE : EXIT_SUCCESS;
   }
   }// namespace Kataglyphis
