mirror of
https://github.com/libretro/MesenCE.git
synced 2026-11-10 11:11:32 -10:00
* Code: Add auto-formatting rules for C++ projects (clang-format) and enforce code style via "clang-format" and "dotnet format" * fix ui format warnings
34 lines
1.0 KiB
C++
34 lines
1.0 KiB
C++
#pragma once
|
|
#include "pch.h"
|
|
#include <unordered_map>
|
|
#include "NES/RomData.h"
|
|
#include "Utilities/SimpleLock.h"
|
|
|
|
struct NesHeader;
|
|
|
|
class GameDatabase
|
|
{
|
|
private:
|
|
static std::unordered_map<uint32_t, GameInfo> _gameDatabase;
|
|
static bool _enabled;
|
|
static bool _initialized;
|
|
static SimpleLock _loadLock;
|
|
|
|
template<typename T> static T ToInt(string value);
|
|
template<typename T> static T ToSize(string value);
|
|
|
|
static BusConflictType GetBusConflictType(string busConflictSetting);
|
|
static GameSystem GetGameSystem(string system);
|
|
static uint8_t GetSubMapper(GameInfo& info);
|
|
|
|
static void InitDatabase();
|
|
static void UpdateRomData(GameInfo& info, RomData& romData);
|
|
static void LoadGameDb(vector<string> data);
|
|
|
|
public:
|
|
static void LoadGameDb(std::istream& db);
|
|
|
|
static void SetGameInfo(uint32_t romCrc, RomData& romData, bool updateRomData, bool forHeaderlessRom);
|
|
static bool GetiNesHeader(uint32_t romCrc, NesHeader& nesHeader);
|
|
static bool GetDbRomSize(uint32_t romCrc, uint32_t& prgSize, uint32_t& chrSize);
|
|
}; |