Minor fixes
This commit is contained in:
parent
8c6cf7ae59
commit
1455d1927f
2 changed files with 5 additions and 2 deletions
|
|
@ -82,6 +82,7 @@ proc getImageSize*(profile: AccountProfile): int =
|
|||
result = res.int
|
||||
|
||||
proc imageSize*(user: User): int =
|
||||
ensureEnabled()
|
||||
var prof: AccountProfile
|
||||
var size: csize
|
||||
let res = accountProfileGetImageSize(prof.addr, size.addr).newResult
|
||||
|
|
@ -202,6 +203,7 @@ proc getProfile*(user: User): Profile =
|
|||
|
||||
|
||||
proc getUserCount*(): int32 =
|
||||
ensureEnabled()
|
||||
var count: int32
|
||||
let res = accountGetUserCount(count.addr).newResult
|
||||
if res.failed:
|
||||
|
|
@ -213,6 +215,7 @@ proc getUserCount*(): int32 =
|
|||
|
||||
|
||||
proc listAllUsers*(): seq[User] =
|
||||
ensureEnabled()
|
||||
result = @[]
|
||||
|
||||
var
|
||||
|
|
|
|||
|
|
@ -287,7 +287,7 @@ proc getHandheldMode*(): bool =
|
|||
## and CONTROLLER_PLAYER_2 for example).
|
||||
## / id must be CONTROLLER_PLAYER_*.
|
||||
proc setJoyConModeSingle*(id: Controller): Result =
|
||||
if not (id in {Controller.Player1 .. Controller.Player8}):
|
||||
if id notin {Controller.Player1 .. Controller.Player8}:
|
||||
raiseEx(ControllerSelectError, "Must be controller 1-8")
|
||||
hidSetNpadJoyAssignmentModeSingleByDefault(id.HidControllerId).newResult
|
||||
|
||||
|
|
@ -299,7 +299,7 @@ proc setJoyConModeSingle*(id: Controller): Result =
|
|||
## and CONTROLLER_PLAYER_2 for example).
|
||||
## / id must be CONTROLLER_PLAYER_*.
|
||||
proc setJoyconModeDual*(id: Controller): Result =
|
||||
if not (id in {Controller.Player1 .. Controller.Player8}):
|
||||
if id notin {Controller.Player1 .. Controller.Player8}:
|
||||
raiseEx(ControllerSelectError, "Must be controller 1-8")
|
||||
hidSetNpadJoyAssignmentModeDual(id.HidControllerId).newResult
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue