Fix comma error and update to latest libnx

This commit is contained in:
Joey Yakimowich-Payne 2018-06-25 22:22:36 +09:00
commit fcf2315c7a
4 changed files with 25 additions and 3 deletions

View file

@ -248,7 +248,7 @@ search.key_right = " KEY_RIGHT = KEY_DRIGHT or KEY_LSTICK_RIGHT or KEY_RSTICK
replace.key_right = ""
search.key_rstick_down = " KEY_RSTICK_DOWN"
prepend.key_rstick_down = """
KEY_RIGHT = KEY_DRIGHT.int or KEY_LSTICK_RIGHT.int or KEY_RSTICK_RIGHT.int ## /< D-Pad Right or Sticks Right
KEY_RIGHT = KEY_DRIGHT.int or KEY_LSTICK_RIGHT.int or KEY_RSTICK_RIGHT.int, ## /< D-Pad Right or Sticks Right
"""
search.key_up = " KEY_UP = KEY_DUP or KEY_LSTICK_UP or KEY_RSTICK_UP, ## /< D-Pad Up or Sticks Up"

View file

@ -2,4 +2,12 @@ import strutils
import ospaths
const headerfatal = currentSourcePath().splitPath().head & "/nx/include/switch/services/fatal.h"
import libnx/wrapper/types
proc fatalSimple*(err: Result) {.cdecl, importc: "fatalSimple", header: headerfatal.}
type
FatalType* {.size: sizeof(cint).} = enum
FatalType_ErrorReportAndErrorScreen = 0, FatalType_ErrorReport = 1,
FatalType_ErrorScreen = 2
proc fatalSimple*(err: Result) {.cdecl, importc: "fatalSimple", header: headerfatal.}
proc fatalWithType*(err: Result; `type`: FatalType) {.cdecl,
importc: "fatalWithType", header: headerfatal.}

View file

@ -120,7 +120,7 @@ type
KEY_RSTICK_UP = BIT(21), ## /< Right Stick Up
KEY_UP = KEY_DUP.int or KEY_LSTICK_UP.int or KEY_RSTICK_UP.int, ## /< D-Pad Up or Sticks Up
KEY_RSTICK_RIGHT = BIT(22), ## /< Right Stick Right
KEY_RIGHT = KEY_DRIGHT.int or KEY_LSTICK_RIGHT.int or KEY_RSTICK_RIGHT.int ## /< D-Pad Right or Sticks Right
KEY_RIGHT = KEY_DRIGHT.int or KEY_LSTICK_RIGHT.int or KEY_RSTICK_RIGHT.int, ## /< D-Pad Right or Sticks Right
KEY_RSTICK_DOWN = BIT(23), ## /< Right Stick Down
KEY_DOWN = KEY_DDOWN.int or KEY_LSTICK_DOWN.int or KEY_RSTICK_DOWN.int, ## /< D-Pad Down or Sticks Down
KEY_SL = BIT(24), ## /< SL

View file

@ -7,9 +7,23 @@
#pragma once
#include "../types.h"
typedef enum {
FatalType_ErrorReportAndErrorScreen = 0,
FatalType_ErrorReport = 1,
FatalType_ErrorScreen = 2
} FatalType;
/**
* @brief Triggers a system fatal error.
* @param err[in] Result code to throw.
* @note This function does not return.
*/
void NORETURN fatalSimple(Result err);
/**
* @brief Triggers a system fatal error with a custom FatalType.
* @param err[in] Result code to throw.
* @param err[in] Type of fatal error to throw.
* @note This function does not return.
*/
void NORETURN fatalWithType(Result err, FatalType type);