popn: subscreen overlay (#631)

## Link to GitHub Issue or related Pull Request, if one exists
#618 

## Description of change

Add overlay for subscreen.

Add an option for no subscreen window.

Use the same "force redraw subscreen" logic we used in SDVX to fix the
same issue.

Known issues:

* still crashing when running windowed if there is only one monitor
* having only one monitor causes sunscreen overlay to not work
(NumberOfAdaptersInGroup issue?)

## Testing
This commit is contained in:
bicarus
2026-04-12 02:11:24 -07:00
committed by GitHub
parent 4d8a6c1952
commit 9936088286
13 changed files with 159 additions and 4 deletions
+22
View File
@@ -0,0 +1,22 @@
#pragma once
#include <windows.h>
#include "overlay/window.h"
#include "overlay/windows/generic_sub.h"
namespace overlay::windows {
class PopnSubScreen : public GenericSubScreen {
public:
PopnSubScreen(SpiceOverlay *overlay);
protected:
void touch_transform(const ImVec2 xy_in, LONG *x_out, LONG *y_out) override;
private:
static void keep_16_by_10(ImGuiSizeCallbackData* data) {
data->DesiredSize.y = (data->DesiredSize.x * 10.f / 16.f) + ImGui::GetFrameHeight();
}
};
}