assert_handler_lifecycle.h 516 B

1234567891011121314151617
  1. #pragma once
  2. namespace sunrise::client::hooks::assert_handler {
  3. /**
  4. * Replaces the game's fatal assert handler so an assert reports instead of halting.
  5. * @return True when the handler is installed or its target was never found.
  6. */
  7. [[nodiscard]] bool install() noexcept;
  8. /** Restores the game's own handler. */
  9. [[nodiscard]] bool uninstall() noexcept;
  10. /** @return True while Sunrise's handler owns the slot. */
  11. [[nodiscard]] bool is_installed() noexcept;
  12. } // namespace sunrise::client::hooks::assert_handler