[gnome-games] retro: Add RetroRunner.get_platform_name()
- From: Adrien Plazas <aplazas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-games] retro: Add RetroRunner.get_platform_name()
- Date: Thu, 16 Feb 2017 21:59:08 +0000 (UTC)
commit e2a21a602eac5b60bfa9853e2be8da772620bcf8
Author: Adrien Plazas <kekun plazas laposte net>
Date: Thu Feb 16 21:48:02 2017 +0100
retro: Add RetroRunner.get_platform_name()
This will be used in a subsequent commit to get a displayable platform
name from a Libretro Core Descriptor platform string.
https://bugzilla.gnome.org/show_bug.cgi?id=778773
src/retro/retro-runner.vala | 71 +++++++++++++++++++++++++++++++++++++++++++
1 files changed, 71 insertions(+), 0 deletions(-)
---
diff --git a/src/retro/retro-runner.vala b/src/retro/retro-runner.vala
index c63960d..9868e65 100644
--- a/src/retro/retro-runner.vala
+++ b/src/retro/retro-runner.vala
@@ -490,4 +490,75 @@ public class Games.RetroRunner : Object, Runner {
return;
}
}
+
+ private static string? get_platform_name (string platform) {
+ switch (platform) {
+ case "Atari2600":
+ return _("Atari 2600");
+ case "Atari5200":
+ return _("Atari 5200");
+ case "Atari7800":
+ return _("Atari 7800");
+ case "Dreamcast":
+ return _("Dreamcast");
+ case "FamicomDiskSystem":
+ return _("Famicom Disk System");
+ case "GameBoy":
+ return _("Game Boy");
+ case "GameBoyColor":
+ return _("Game Boy Color");
+ case "GameBoyAdvance":
+ return _("Game Boy Advance");
+ case "GameCube":
+ return _("GameCube");
+ case "GameGear":
+ return _("Game Gear");
+ case "NintendoEntertainmentSystem":
+ return _("Nintendo Entertainment System");
+ case "Nintendo64":
+ return _("Nintendo 64");
+ case "NintendoDS":
+ return _("Nintendo DS");
+ case "Nintendo3DS":
+ return _("Nintendo 3DS");
+ case "PlayStation":
+ return _("PlayStation");
+ case "PlayStation2":
+ return _("PlayStation 2");
+ case "PlayStation3":
+ return _("PlayStation 3");
+ case "PlayStation4":
+ return _("PlayStation 4");
+ case "PlayStationPortable":
+ return _("PlayStation Portable");
+ case "PlayStationVita":
+ return _("PlayStation Vita");
+ case "Sega32X":
+ return _("Genesis 32X");
+ case "SegaCD":
+ return _("Sega CD");
+ case "SegaCD32X":
+ return _("Sega CD 32X");
+ case "SegaGenesis":
+ return _("Sega Genesis");
+ case "SegaMasterSystem":
+ return _("Sega Master System");
+ case "SegaSaturn":
+ return _("Sega Saturn");
+ case "SG1000":
+ return _("SG-1000");
+ case "SuperNintendoEntertainmentSystem":
+ return _("Super Nintendo Entertainment System");
+ case "TurboGrafx16":
+ return _("TurboGrafx-16");
+ case "TurboGrafxCD":
+ return _("TurboGrafx-CD");
+ case "Wii":
+ return _("Wii");
+ case "WiiU":
+ return _("Wii U");
+ default:
+ return null;
+ }
+ }
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]