mirror of
https://github.com/spice2x/spice2x.github.io.git
synced 2026-08-02 14:50:41 -07:00
22aeb64ff9
- Include order and forward decls were breaking button.h because a declared but not defined struct can't be initiated (honestly this file was cooked, crazy include order). - `MAXINT` is GCC specific, `INT_MAX` is portable. - InterlockedDecrement takes a LONG, not ULONG - an imgui printf-style call using a direct string instead of %s (let's ignore the fact that it's actually safe based on how the str is constructed) - missing `override` on a virtual subclass - `CALLBACK` on a lambda threw me for a loop, but I believe moving it after the arg list is the correct approach (see if it builds on gcc I guess) - `std::result_of` was removed in C++20, which the project is built with
37 lines
940 B
C++
37 lines
940 B
C++
#pragma once
|
|
|
|
#include "overlay/window.h"
|
|
|
|
namespace overlay::windows {
|
|
|
|
class ScreenResize : public Window {
|
|
public:
|
|
ScreenResize(SpiceOverlay *overlay);
|
|
~ScreenResize() override;
|
|
|
|
void build_content() override;
|
|
void update() override;
|
|
|
|
private:
|
|
size_t toggle_screen_resize = ~0u;
|
|
bool toggle_screen_resize_state = false;
|
|
|
|
size_t toggle_scene[4] = { ~0u, ~0u, ~0u, ~0u };
|
|
uint32_t toggle_scene_state = ~0u;
|
|
|
|
void build_fullscreen_config();
|
|
void build_windowed_config();
|
|
void build_footer();
|
|
std::string hwnd_preview(int index, HWND hwnd);
|
|
HWND get_first_window();
|
|
|
|
void reset_window();
|
|
void reset_vars_to_default();
|
|
|
|
static LRESULT CALLBACK screen_resize_wndproc(
|
|
HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam);
|
|
|
|
static void wndproc_wm_sizing(int edge, RECT& rect);
|
|
};
|
|
}
|