[gnome-games] game-boy: Add is_color() to GameBoyHeader



commit de8201b955b0128689fac91fd696a893f4c8510f
Author: Adrien Plazas <kekun plazas laposte net>
Date:   Sat Aug 27 21:27:37 2016 +0200

    game-boy: Add is_color() to GameBoyHeader
    
    This will be used in the next commit to discriminte GameBoy headers from
    GameBoyColor ones.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=769495

 plugins/game-boy/src/game-boy-header.vala |   11 +++++++++++
 1 files changed, 11 insertions(+), 0 deletions(-)
---
diff --git a/plugins/game-boy/src/game-boy-header.vala b/plugins/game-boy/src/game-boy-header.vala
index 9bc461f..d8a0b35 100644
--- a/plugins/game-boy/src/game-boy-header.vala
+++ b/plugins/game-boy/src/game-boy-header.vala
@@ -106,6 +106,17 @@ private class Games.GameBoyHeader : Object {
                        return false;
                }
        }
+
+       public bool is_color () {
+               switch (game_boy_type) {
+               case GameBoyType.SUPER_COLOR_ENABLED:
+               case GameBoyType.COLOR_ENABLED:
+               case GameBoyType.COLOR_ONLY:
+                       return true;
+               default:
+                       return false;
+               }
+       }
 }
 
 private enum Games.GameBoyType {


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]