Commit c7e6cdba authored by Eli Zaretskii's avatar Eli Zaretskii
Browse files

(gamegrid-display-type): Treat any

color-capable display as color-x, if display-color-p is fboundp.
(gamegrid-make-color-x-face): Don't call gamegrid-color twice.
(gamegrid-make-color-tty-face): Use the value of color, not the
symbol itself.  Don't call gamegrid-color.
parent e9a0a549
...@@ -166,10 +166,10 @@ static char *noname[] = { ...@@ -166,10 +166,10 @@ static char *noname[] = {
face)) face))
(defun gamegrid-make-color-tty-face (color) (defun gamegrid-make-color-tty-face (color)
(let* ((hex (gamegrid-color color 1.0)) (let* ((color-str (symbol-value color))
(name (intern (format "gamegrid-color-tty-face-%s" hex))) (name (intern (format "gamegrid-color-tty-face-%s" color-str)))
(face (make-face name))) (face (make-face name)))
(gamegrid-setup-face face color) (gamegrid-setup-face face color-str)
face)) face))
(defun gamegrid-make-grid-x-face () (defun gamegrid-make-grid-x-face ()
...@@ -190,7 +190,7 @@ static char *noname[] = { ...@@ -190,7 +190,7 @@ static char *noname[] = {
(let* ((hex (gamegrid-color color 1.0)) (let* ((hex (gamegrid-color color 1.0))
(name (intern (format "gamegrid-color-x-face-%s" hex))) (name (intern (format "gamegrid-color-x-face-%s" hex)))
(face (make-face name))) (face (make-face name)))
(gamegrid-setup-face face (gamegrid-color color 1.0)) (gamegrid-setup-face face hex)
face)) face))
(defun gamegrid-make-face (data-spec-list color-spec-list) (defun gamegrid-make-face (data-spec-list color-spec-list)
...@@ -257,6 +257,8 @@ static char *noname[] = { ...@@ -257,6 +257,8 @@ static char *noname[] = {
(let ((window-system-p (let ((window-system-p
(or (and (fboundp 'console-on-window-system-p) (or (and (fboundp 'console-on-window-system-p)
(console-on-window-system-p)) (console-on-window-system-p))
(and (fboundp 'display-color-p)
window-system))) window-system)))
(cond ((and gamegrid-use-glyphs (cond ((and gamegrid-use-glyphs
window-system-p window-system-p
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment