[gnome-games] master-system: Add is_game_gear() to MasterSystemRegion



commit 21bc8aac95d5638525f36acc1345f67046e9cca1
Author: Adrien Plazas <kekun plazas laposte net>
Date:   Wed Aug 3 16:30:22 2016 +0200

    master-system: Add is_game_gear() to MasterSystemRegion
    
    This will be used in the next commit to discriminte Master System
    headers from Game Gear ones.

 .../master-system/src/master-system-header.vala    |   11 +++++++++++
 1 files changed, 11 insertions(+), 0 deletions(-)
---
diff --git a/plugins/master-system/src/master-system-header.vala 
b/plugins/master-system/src/master-system-header.vala
index a261d45..8593d8c 100644
--- a/plugins/master-system/src/master-system-header.vala
+++ b/plugins/master-system/src/master-system-header.vala
@@ -78,6 +78,17 @@ private class Games.MasterSystemHeader : Object {
                        return false;
                }
        }
+
+       public bool is_game_gear () {
+               switch (region_code) {
+               case MasterSystemRegion.GG_JAPAN:
+               case MasterSystemRegion.GG_EXPORT:
+               case MasterSystemRegion.GG_INTERNATIONAL:
+                       return true;
+               default:
+                       return false;
+               }
+       }
 }
 
 private enum Games.MasterSystemRegion {


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