Skip to content

Commit ea71a6f

Browse files
committed
Merge branch 'dev'
2 parents 6323f09 + 9b06009 commit ea71a6f

File tree

128 files changed

+493
-419
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

128 files changed

+493
-419
lines changed

Emulator/Agnus/Agnus.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ void
6464
Agnus::resetConfig()
6565
{
6666
assert(isPoweredOff());
67-
auto &defaults = amiga.properties;
67+
auto &defaults = amiga.defaults;
6868

6969
std::vector <Option> options = {
7070

Emulator/Agnus/Blitter/Blitter.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ void
7373
Blitter::resetConfig()
7474
{
7575
assert(isPoweredOff());
76-
auto &defaults = amiga.properties;
76+
auto &defaults = amiga.defaults;
7777

7878
std::vector <Option> options = {
7979

Emulator/Agnus/DmaDebugger/DmaDebugger.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ void
1919
DmaDebugger::resetConfig()
2020
{
2121
assert(isPoweredOff());
22-
auto &defaults = amiga.properties;
22+
auto &defaults = amiga.defaults;
2323

2424
std::vector <Option> options = {
2525

Emulator/Amiga.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ static_assert(sizeof(u16) == 2, "u16 size mismatch");
2323
static_assert(sizeof(u32) == 4, "u32 size mismatch");
2424
static_assert(sizeof(u64) == 8, "u64 size mismatch");
2525

26-
Properties Amiga::properties;
26+
Defaults Amiga::defaults;
2727

2828
string
2929
Amiga::version()
@@ -830,7 +830,7 @@ Amiga::_dump(Category category, std::ostream& os) const
830830

831831
if (category == Category::Defaults) {
832832

833-
properties.dump(category, os);
833+
defaults.dump(category, os);
834834
}
835835
}
836836

Emulator/Amiga.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
#include "ControlPort.h"
1515
#include "CIA.h"
1616
#include "CPU.h"
17+
#include "Defaults.h"
1718
#include "Denise.h"
1819
#include "FloppyDrive.h"
1920
#include "GdbServer.h"
@@ -23,7 +24,6 @@
2324
#include "MsgQueue.h"
2425
#include "OSDebugger.h"
2526
#include "Paula.h"
26-
#include "Properties.h"
2727
#include "RegressionTester.h"
2828
#include "RemoteManager.h"
2929
#include "RetroShell.h"
@@ -59,7 +59,7 @@ class Amiga : public Thread {
5959
public:
6060

6161
// User settings
62-
static Properties properties;
62+
static Defaults defaults;
6363

6464
// Core components
6565
CPU cpu = CPU(*this);

Emulator/Base/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ target_sources(vAmigaCore PRIVATE
33
Error.cpp
44
AmigaObject.cpp
55
AmigaComponent.cpp
6-
Properties.cpp
6+
Defaults.cpp
77
SubComponent.cpp
88
Thread.cpp
99
MsgQueue.cpp
Lines changed: 30 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
// -----------------------------------------------------------------------------
99

1010
#include "config.h"
11-
#include "Properties.h"
11+
#include "Defaults.h"
1212
#include "Amiga.h"
1313
#include "StringUtils.h"
1414
#include "AgnusTypes.h"
@@ -27,7 +27,7 @@
2727
#include "RemoteManagerTypes.h"
2828
#include "RemoteServerTypes.h"
2929

30-
Properties::Properties()
30+
Defaults::Defaults()
3131
{
3232
setFallback(OPT_AGNUS_REVISION, AGNUS_ECS_1MB);
3333
setFallback(OPT_SLOW_RAM_MIRROR, true);
@@ -140,7 +140,7 @@ Properties::Properties()
140140
}
141141

142142
void
143-
Properties::_dump(Category category, std::ostream& os) const
143+
Defaults::_dump(Category category, std::ostream& os) const
144144
{
145145
for (const auto &it: fallbacks) {
146146

@@ -160,7 +160,7 @@ Properties::_dump(Category category, std::ostream& os) const
160160
}
161161

162162
void
163-
Properties::load(const fs::path &path)
163+
Defaults::load(const fs::path &path)
164164
{
165165
auto fs = std::ifstream(path, std::ifstream::binary);
166166

@@ -173,7 +173,7 @@ Properties::load(const fs::path &path)
173173
}
174174

175175
void
176-
Properties::load(std::ifstream &stream)
176+
Defaults::load(std::ifstream &stream)
177177
{
178178
std::stringstream ss;
179179
ss << stream.rdbuf();
@@ -182,7 +182,7 @@ Properties::load(std::ifstream &stream)
182182
}
183183

184184
void
185-
Properties::load(std::stringstream &stream)
185+
Defaults::load(std::stringstream &stream)
186186
{
187187
isize line = 0;
188188
isize accepted = 0;
@@ -251,7 +251,7 @@ Properties::load(std::stringstream &stream)
251251
}
252252

253253
void
254-
Properties::save(const fs::path &path)
254+
Defaults::save(const fs::path &path)
255255
{
256256
auto fs = std::ofstream(path, std::ofstream::binary);
257257

@@ -263,7 +263,7 @@ Properties::save(const fs::path &path)
263263
}
264264

265265
void
266-
Properties::save(std::ofstream &stream)
266+
Defaults::save(std::ofstream &stream)
267267
{
268268
std::stringstream ss;
269269
save(ss);
@@ -272,7 +272,7 @@ Properties::save(std::ofstream &stream)
272272
}
273273

274274
void
275-
Properties::save(std::stringstream &stream)
275+
Defaults::save(std::stringstream &stream)
276276
{
277277
{ SYNCHRONIZED
278278

@@ -320,7 +320,7 @@ Properties::save(std::stringstream &stream)
320320
}
321321

322322
string
323-
Properties::getString(const string &key)
323+
Defaults::getString(const string &key)
324324
{
325325
if (values.contains(key)) return values[key];
326326
if (fallbacks.contains(key)) return fallbacks[key];
@@ -331,7 +331,7 @@ Properties::getString(const string &key)
331331
}
332332

333333
i64
334-
Properties::getInt(const string &key)
334+
Defaults::getInt(const string &key)
335335
{
336336
auto value = getString(key);
337337
i64 result = 0;
@@ -350,19 +350,19 @@ Properties::getInt(const string &key)
350350
}
351351

352352
i64
353-
Properties::get(Option option)
353+
Defaults::get(Option option)
354354
{
355355
return getInt(string(OptionEnum::key(option)));
356356
}
357357

358358
i64
359-
Properties::get(Option option, isize nr)
359+
Defaults::get(Option option, isize nr)
360360
{
361361
return getInt(string(OptionEnum::key(option)) + std::to_string(nr));
362362
}
363363

364364
string
365-
Properties::getFallback(const string &key)
365+
Defaults::getFallback(const string &key)
366366
{
367367
if (!fallbacks.contains(key)) {
368368

@@ -375,7 +375,7 @@ Properties::getFallback(const string &key)
375375
}
376376

377377
void
378-
Properties::setString(const string &key, const string &value)
378+
Defaults::setString(const string &key, const string &value)
379379
{
380380
{ SYNCHRONIZED
381381

@@ -393,7 +393,7 @@ Properties::setString(const string &key, const string &value)
393393
}
394394

395395
void
396-
Properties::set(Option option, i64 value)
396+
Defaults::set(Option option, i64 value)
397397
{
398398
auto key = string(OptionEnum::key(option));
399399
auto val = std::to_string(value);
@@ -402,7 +402,7 @@ Properties::set(Option option, i64 value)
402402
}
403403

404404
void
405-
Properties::set(Option option, isize nr, i64 value)
405+
Defaults::set(Option option, isize nr, i64 value)
406406
{
407407
auto key = string(OptionEnum::key(option)) + std::to_string(nr);
408408
auto val = std::to_string(value);
@@ -411,13 +411,13 @@ Properties::set(Option option, isize nr, i64 value)
411411
}
412412

413413
void
414-
Properties::set(Option option, std::vector <isize> nrs, i64 value)
414+
Defaults::set(Option option, std::vector <isize> nrs, i64 value)
415415
{
416416
for (auto &nr : nrs) set(option, nr, value);
417417
}
418418

419419
void
420-
Properties::setFallback(const string &key, const string &value)
420+
Defaults::setFallback(const string &key, const string &value)
421421
{
422422
{ SYNCHRONIZED
423423

@@ -428,49 +428,49 @@ Properties::setFallback(const string &key, const string &value)
428428
}
429429

430430
void
431-
Properties::setFallback(Option option, const string &value)
431+
Defaults::setFallback(Option option, const string &value)
432432
{
433433
setFallback(string(OptionEnum::key(option)), value);
434434
}
435435

436436
void
437-
Properties::setFallback(Option option, i64 value)
437+
Defaults::setFallback(Option option, i64 value)
438438
{
439439
setFallback(option, std::to_string(value));
440440
}
441441

442442
void
443-
Properties::setFallback(Option option, isize nr, const string &value)
443+
Defaults::setFallback(Option option, isize nr, const string &value)
444444
{
445445
setFallback(string(OptionEnum::key(option)) + std::to_string(nr), value);
446446
}
447447

448448
void
449-
Properties::setFallback(Option option, isize nr, i64 value)
449+
Defaults::setFallback(Option option, isize nr, i64 value)
450450
{
451451
setFallback(option, nr, std::to_string(value));
452452
}
453453

454454
void
455-
Properties::setFallback(Option option, std::vector <isize> nrs, const string &value)
455+
Defaults::setFallback(Option option, std::vector <isize> nrs, const string &value)
456456
{
457457
for (auto &nr : nrs) setFallback(option, nr, value);
458458
}
459459

460460
void
461-
Properties::setFallback(Option option, std::vector <isize> nrs, i64 value)
461+
Defaults::setFallback(Option option, std::vector <isize> nrs, i64 value)
462462
{
463463
setFallback(option, nrs, std::to_string(value));
464464
}
465465

466466
void
467-
Properties::remove()
467+
Defaults::remove()
468468
{
469469
SYNCHRONIZED values.clear();
470470
}
471471

472472
void
473-
Properties::remove(const string &key)
473+
Defaults::remove(const string &key)
474474
{
475475
{ SYNCHRONIZED
476476

@@ -487,19 +487,19 @@ Properties::remove(const string &key)
487487
}
488488

489489
void
490-
Properties::remove(Option option)
490+
Defaults::remove(Option option)
491491
{
492492
remove(string(OptionEnum::key(option)));
493493
}
494494

495495
void
496-
Properties::remove(Option option, isize nr)
496+
Defaults::remove(Option option, isize nr)
497497
{
498498
remove(string(OptionEnum::key(option)) + std::to_string(nr));
499499
}
500500

501501
void
502-
Properties::remove(Option option, std::vector <isize> nrs)
502+
Defaults::remove(Option option, std::vector <isize> nrs)
503503
{
504504
for (auto &nr : nrs) remove(option, nr);
505505
}
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
#include "AmigaComponent.h"
1313
#include "IOUtils.h"
1414

15-
class Properties : public AmigaObject {
15+
class Defaults : public AmigaObject {
1616

1717
mutable util::ReentrantMutex mutex;
1818

@@ -29,9 +29,9 @@ class Properties : public AmigaObject {
2929

3030
public:
3131

32-
Properties();
33-
Properties(Properties const&) = delete;
34-
void operator=(Properties const&) = delete;
32+
Defaults();
33+
Defaults(Defaults const&) = delete;
34+
void operator=(Defaults const&) = delete;
3535

3636

3737
//

Emulator/CIA/CIA.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ void
6262
CIA::resetConfig()
6363
{
6464
assert(isPoweredOff());
65-
auto &defaults = amiga.properties;
65+
auto &defaults = amiga.defaults;
6666

6767
std::vector <Option> options = {
6868

Emulator/CPU/CPU.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,7 @@ void
262262
CPU::resetConfig()
263263
{
264264
assert(isPoweredOff());
265-
auto &defaults = amiga.properties;
265+
auto &defaults = amiga.defaults;
266266

267267
std::vector <Option> options = {
268268

0 commit comments

Comments
 (0)