Skip to content

Commit

Permalink
[server] 3.3 support: remap wave 2 to 5 via config param
Browse files Browse the repository at this point in the history
  • Loading branch information
okay committed Aug 26, 2023
1 parent 4412f33 commit 39f9214
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/server/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,10 @@ void doUpdate(SwtFB &fb, const swtfb_update &s) {
case WAVEFORM_MODE_DU:
return 1;
case WAVEFORM_MODE_GC16:
if (fb.remapWave2to5) {
return 5;
}

return 2;
default:
fb.ClearGhosting();
Expand Down
1 change: 1 addition & 0 deletions src/shared/config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -421,6 +421,7 @@ wait addr 0x55a39c
getInstance addr 0x54eeac
notify addr 0x558464
waveformClass str EPFramebuffer::Waveform
remapWave2to5 str 1
)CONF";

Expand Down
4 changes: 4 additions & 0 deletions src/shared/swtfb.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ class SwtFB {
std::string WAVEFORM_MODE = "";

public:
bool remapWave2to5 = false;

SwtFB()
: config(read_config()) {}

Expand All @@ -51,6 +53,8 @@ class SwtFB {
}
std::cerr << "Using waveform mode " << WAVEFORM_MODE << std::endl;

remapWave2to5 = config.find("remapWave2to5") != config.end();

return true;
}

Expand Down

0 comments on commit 39f9214

Please sign in to comment.