Add new reset section for nimgen and cleanup console
This commit is contained in:
parent
d522104ad0
commit
800877cc7e
3 changed files with 5 additions and 7 deletions
|
|
@ -1,6 +1,6 @@
|
||||||
# Package
|
# Package
|
||||||
|
|
||||||
version = "0.1.4"
|
version = "0.1.5"
|
||||||
author = "Joey Payne"
|
author = "Joey Payne"
|
||||||
description = "Nintendo Switch library libnx for Nim."
|
description = "Nintendo Switch library libnx for Nim."
|
||||||
license = "The Unlicense"
|
license = "The Unlicense"
|
||||||
|
|
|
||||||
|
|
@ -3,6 +3,7 @@ output="src/libnx/wrapper"
|
||||||
c_compiler="aarch64-none-elf-gcc"
|
c_compiler="aarch64-none-elf-gcc"
|
||||||
cpp_compiler="aarch64-none-elf-g++"
|
cpp_compiler="aarch64-none-elf-g++"
|
||||||
filter=lock
|
filter=lock
|
||||||
|
reset=true
|
||||||
|
|
||||||
[n.include]
|
[n.include]
|
||||||
"${output}/nx/include"
|
"${output}/nx/include"
|
||||||
|
|
|
||||||
|
|
@ -6,10 +6,7 @@ import macros, strutils
|
||||||
type
|
type
|
||||||
PrintCallback* = proc (con: pointer; c: cint): bool
|
PrintCallback* = proc (con: pointer; c: cint): bool
|
||||||
|
|
||||||
#Font* = ref object
|
Font* = ref ConsoleFont
|
||||||
# gfx*: Buffer[uint16]
|
|
||||||
# asciiOffset*: uint16
|
|
||||||
# numChars*: uint16
|
|
||||||
|
|
||||||
Style* {.pure.} = enum
|
Style* {.pure.} = enum
|
||||||
Bold = CONSOLE_COLOR_BOLD(),
|
Bold = CONSOLE_COLOR_BOLD(),
|
||||||
|
|
@ -71,9 +68,9 @@ proc toConsole(pconsole: ptr PrintConsole): Console =
|
||||||
#result.printCharCallback = cast[PrintCallback](pconsole.PrintChar)
|
#result.printCharCallback = cast[PrintCallback](pconsole.PrintChar)
|
||||||
result.initialised = pconsole.consoleInitialised
|
result.initialised = pconsole.consoleInitialised
|
||||||
|
|
||||||
proc setFont*(console: Console; font: ConsoleFont) =
|
proc setFont*(console: Console; font: Font) =
|
||||||
var f = font
|
var f = font
|
||||||
consoleSetFont(console.pcon, f.addr)
|
consoleSetFont(console.pcon, f[].addr)
|
||||||
console.font = console.pcon.font
|
console.font = console.pcon.font
|
||||||
|
|
||||||
proc setWindow*(console: Console, x, y, width, height: int) =
|
proc setWindow*(console: Console, x, y, width, height: int) =
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue