-
Notifications
You must be signed in to change notification settings - Fork 152
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Imagine: Merge bitset.hh into bit.hh * Imagine: Add utility functions for bit set classes * Imagine: Convert all bit set enums into classes with bit fields for easier usage * Imagine: Allow null BufferDeleter * EmuFramework: Store recent content items as separate entries in config file * EmuFramework: Add option to set max recent content items
- Loading branch information
Robert Broglia
committed
Aug 21, 2023
1 parent
3dbac69
commit 43f5c8e
Showing
107 changed files
with
655 additions
and
531 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
#pragma once | ||
|
||
/* This file is part of EmuFramework. | ||
Imagine is free software: you can redistribute it and/or modify | ||
it under the terms of the GNU General Public License as published by | ||
the Free Software Foundation, either version 3 of the License, or | ||
(at your option) any later version. | ||
Imagine is distributed in the hope that it will be useful, | ||
but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
GNU General Public License for more details. | ||
You should have received a copy of the GNU General Public License | ||
along with EmuFramework. If not, see <http://www.gnu.org/licenses/> */ | ||
|
||
#include <imagine/fs/FSDefs.hh> | ||
#include <vector> | ||
#include <string_view> | ||
|
||
namespace IG | ||
{ | ||
class ApplicationContext; | ||
class FileIO; | ||
class MapIO; | ||
} | ||
|
||
namespace EmuEx | ||
{ | ||
|
||
class EmuSystem; | ||
|
||
using namespace IG; | ||
|
||
struct RecentContentInfo | ||
{ | ||
FS::PathString path; | ||
FS::FileString name; | ||
|
||
constexpr bool operator==(RecentContentInfo const& rhs) const | ||
{ | ||
return path == rhs.path; | ||
} | ||
}; | ||
|
||
class RecentContent | ||
{ | ||
public: | ||
void add(std::string_view path, std::string_view name); | ||
void add(const EmuSystem &); | ||
size_t size() const { return recentContentList.size(); } | ||
auto begin() const { return recentContentList.begin(); } | ||
auto end() const { return recentContentList.end(); } | ||
void clear() { recentContentList.clear(); } | ||
void writeConfig(FileIO &) const; | ||
bool readConfig(MapIO &, unsigned key, size_t size, const EmuSystem &); | ||
bool readLegacyConfig(MapIO &, const EmuSystem &); | ||
|
||
private: | ||
std::vector<RecentContentInfo> recentContentList; | ||
public: | ||
static constexpr uint8_t defaultMaxRecentContent{20}; | ||
uint8_t maxRecentContent{defaultMaxRecentContent}; | ||
}; | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.