GNOME Bugzilla – Bug 783111
plugins: Refactor plugins registering one MIME type per platform
Last modified: 2017-05-26 05:44:53 UTC
Many plugins are just copies of each other with a few strings changed: MIME-types, platforms and prefixes declarations. These could be refactored to be greatly simplified, or even better they could be dropped and these simple types could be handled directly into Games and not as plugins.
Created attachment 352603 [details] [review] retro: Add RetroSimpleType This will be used to describe a simple game type, where one MIME type match one platform and vice versa. It will help simplifying game type declaration.
Created attachment 352604 [details] [review] retro: Add RetroSimpleGameUriAdapter This will be used to avoid code duplication in many plugins.
Created attachment 352605 [details] [review] ui: Register game types from the application Make the application register simple game types from the constant RETRO_SIMPLE_GAME_TYPES array. This will allow to replace many plugins by a few lines in this array.
Created attachment 352606 [details] [review] amiga: Replace the plugin by a simple type
Created attachment 352607 [details] [review] atari-2600: Replace the plugin by a simple type
Created attachment 352608 [details] [review] atari-7800: Replace the plugin by a simple type
Created attachment 352609 [details] [review] atari-lynx: Replace the plugin by a simple type
Created attachment 352610 [details] [review] doom: Replace the plugin by a simple type
Created attachment 352611 [details] [review] game-boy: Replace the plugin by simple types
Created attachment 352612 [details] [review] game-boy-advance: Replace the plugin by a simple type
Created attachment 352613 [details] [review] master-system: Replace the plugin by simple types
Created attachment 352614 [details] [review] mega-drive: Move cartridge types to simple types
Created attachment 352615 [details] [review] Replace mega-drive plugin by sega-cd plugin The mega-drive plugin stopped handling all Sega Genesis related types in the previous commit and was only handling the Sega CD types. This replacement makes the role of this plugin more clear.
Created attachment 352616 [details] [review] ms-dos: Replace the plugin by a simple type
Created attachment 352617 [details] [review] neo-geo-pocket: Replace the plugin by a simple type
Created attachment 352618 [details] [review] nes: Replace the plugin by simple types
Created attachment 352619 [details] [review] nintendo-64: Replace the plugin by a simple type
Created attachment 352620 [details] [review] pc-engine: Move cartridge types to simple types
Created attachment 352621 [details] [review] Replace pc-engine plugin by turbografx-cd plugin The pc-engine plugin stopped handling all TurboGrafx-16 related types in the previous commit and was only handling the TurboGrafx-CD types. This replacement makes the role of this plugin more clear.
Created attachment 352622 [details] [review] snes: Replace the plugin by a simple type
Created attachment 352623 [details] [review] wii-ware: Replace the plugin by a simple type
Created attachment 352624 [details] [review] wonderswan: Replace the plugin by simple types
Attachment 352603 [details] pushed as 7472dc7 - retro: Add RetroSimpleType Attachment 352604 [details] pushed as e15b879 - retro: Add RetroSimpleGameUriAdapter Attachment 352605 [details] pushed as f873550 - ui: Register game types from the application Attachment 352606 [details] pushed as cee0de4 - amiga: Replace the plugin by a simple type Attachment 352607 [details] pushed as 2f7b72b - atari-2600: Replace the plugin by a simple type Attachment 352608 [details] pushed as b2fc090 - atari-7800: Replace the plugin by a simple type Attachment 352609 [details] pushed as df69c85 - atari-lynx: Replace the plugin by a simple type Attachment 352610 [details] pushed as dc29dac - doom: Replace the plugin by a simple type Attachment 352611 [details] pushed as 65e5c1a - game-boy: Replace the plugin by simple types Attachment 352612 [details] pushed as 4ff9364 - game-boy-advance: Replace the plugin by a simple type Attachment 352613 [details] pushed as 76a795d - master-system: Replace the plugin by simple types Attachment 352614 [details] pushed as e991afe - mega-drive: Move cartridge types to simple types Attachment 352615 [details] pushed as 276cbc8 - Replace mega-drive plugin by sega-cd plugin Attachment 352616 [details] pushed as 14cf007 - ms-dos: Replace the plugin by a simple type Attachment 352617 [details] pushed as 22f1e76 - neo-geo-pocket: Replace the plugin by a simple type Attachment 352618 [details] pushed as 3b7a02a - nes: Replace the plugin by simple types Attachment 352619 [details] pushed as 89a2576 - nintendo-64: Replace the plugin by a simple type Attachment 352620 [details] pushed as 202af19 - pc-engine: Move cartridge types to simple types Attachment 352621 [details] pushed as 96be049 - Replace pc-engine plugin by turbografx-cd plugin Attachment 352622 [details] pushed as 7206bef - snes: Replace the plugin by a simple type Attachment 352623 [details] pushed as d8e90c0 - wii-ware: Replace the plugin by a simple type Attachment 352624 [details] pushed as 1ad2594 - wonderswan: Replace the plugin by simple types