Skip to content

Commit

Permalink
fix windows build
Browse files Browse the repository at this point in the history
  • Loading branch information
srlehn committed Sep 10, 2023
1 parent c388ab3 commit 9f2e281
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
5 changes: 3 additions & 2 deletions drawers/gdiplus/conhostGDIPlus.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import (
"github.com/lxn/win"

"github.com/srlehn/termimg/internal/consts"
"github.com/srlehn/termimg/internal/environ"
"github.com/srlehn/termimg/internal/errors"
"github.com/srlehn/termimg/internal/wndws"
"github.com/srlehn/termimg/term"
Expand All @@ -27,8 +28,8 @@ type drawerGDI struct {

func (d *drawerGDI) Name() string { return `conhost_gdi` }
func (d *drawerGDI) New() term.Drawer { return &drawerGDI{} }
func (d *drawerGDI) IsApplicable(inp term.DrawerCheckerInput) bool {
return inp != nil && inp.Name() == `conhost` && !wndws.RunsOnWine()
func (d *drawerGDI) IsApplicable(inp term.DrawerCheckerInput) (bool, environ.Proprietor) {
return inp != nil && inp.Name() == `conhost` && !wndws.RunsOnWine(), nil
}
func (d *drawerGDI) init() error {
if d == nil {
Expand Down
3 changes: 3 additions & 0 deletions internal/linux/common.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
package linux

type KDMode int
2 changes: 0 additions & 2 deletions internal/linux/console.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@ func KDGetMode(fd uintptr) (mode KDMode, isLinuxConsole bool, _ error) {
return -1, false, err
}

type KDMode int

func (k *KDMode) String() string {
if k == nil {
return `<nil>`
Expand Down

0 comments on commit 9f2e281

Please sign in to comment.