mirror of
https://github.com/Dingo-Shenanigans/ReSkate.git
synced 2026-10-18 08:05:15 +02:00
Map downloader - A host or dedicated server now tells joiners which Thunderstore package its map comes from (the Mods folder name plus manifest.json). - A player without the map gets a card: icon, name, author, version and description, with DOWNLOAD and CANCEL. It works with mouse, keyboard and controller. - Only packages listed as Maps in the ReSkate community are offered, and never deprecated, rejected or NSFW ones. - On yes the package is downloaded, installed into Mods and applied as a live mod, then the session loads the map. A small card on the right shows the progress, so the player can keep skating. - The player stays connected while it downloads: the host gives a player who says they are fetching the map up to 45 minutes instead of the usual load time. - When the server changes map with the player in it, the card says so. - Protocol version 47: map package on map_offer and world_state, and a "fetching the map" flag on map_request and world_ready. Joining - The pause-menu server browser shows a CONNECTING card over the page while a join is under way, and a COULDN'T CONNECT card with the reason when it does not get in. - The session and voice tabs no longer show before the player is in. - Leaving without the map (declined or cancelled download) no longer counts towards the failed-join limit, on servers and player hosts. Input - A card that asks something holds the game's input until the buttons are released. - Steam's overlay hooks XInput in front of ReSkate and answers the game itself, so a controller reached the game behind menus. ReSkate now hooks that hook as well. Mod merging - Mods are read on several threads, at launch and for live merges. A live merge runs below the game's priority. - The paid-cosmetics check reads the game's files and the mods on several threads. - A live merge reuses the paid-cosmetics verdicts it already has and reports its progress and timings. Launcher - NSFW mods and their categories are not shown in the mod browser.
44 lines
2.4 KiB
C++
44 lines
2.4 KiB
C++
#pragma once
|
|
#include <Windows.h>
|
|
#include <string>
|
|
namespace dingosdk::overlay::detail {
|
|
extern thread_local unsigned overlay_input_access;
|
|
struct OverlayInputAccess {
|
|
OverlayInputAccess() { ++overlay_input_access; }
|
|
~OverlayInputAccess() { --overlay_input_access; }
|
|
};
|
|
// The WM_INPUT packet the window procedure has already noted (note_raw_mouse_packet)
|
|
// while that message is handled on this thread; the game reading the same packet
|
|
// through GetRawInputData is then not noted a second time.
|
|
extern thread_local HRAWINPUT noted_raw_input;
|
|
bool block_polled_input();
|
|
// How the game read its controllers while a card held its input (prompt_input_active), for the
|
|
// log when the hold ends: which of the ways the overlay can keep input from it the game used.
|
|
struct PromptReads {
|
|
unsigned xinput{}, xinput_other_thread{}, direct_input{}, hid{}, raw{};
|
|
};
|
|
PromptReads take_prompt_reads() noexcept;
|
|
// For the same log: whose code XInput's entry points lead to first now ("ReSkate.dll" while
|
|
// the capture's hooks are the first there). Another program's hook put in front of them
|
|
// (Steam's or Discord's overlay) can answer the game itself and never come here.
|
|
std::string xinput_entry_owners();
|
|
// Puts the capture back in front of such a hook (it hooks that hook's function). Cheap when
|
|
// there is nothing to do; called about once a second while a controller is being read.
|
|
void keep_xinput_capture_first();
|
|
bool install_input_capture();
|
|
// Skate's controller mode registers the mouse with RIDEV_NOLEGACY, which stops
|
|
// the Windows cursor from moving. While the overlay owns the pointer the mouse
|
|
// is registered without it; the game's own registration returns on close.
|
|
// Call on the game window's thread; does nothing when nothing changed.
|
|
void sync_raw_mouse_registration();
|
|
// The same, when the caller already knows whether the overlay owns the pointer
|
|
// (owns_menu_cursor), as the window procedure does once per mouse message.
|
|
void sync_raw_mouse_registration(bool overlay_owns_pointer);
|
|
// One raw mouse packet, from whichever path the game read it (WM_INPUT,
|
|
// GetRawInputData or GetRawInputBuffer).
|
|
void note_raw_mouse_packet(const RAWMOUSE& mouse);
|
|
void note_raw_mouse_packet(const RAWMOUSE& mouse, bool overlay_owns_pointer);
|
|
// The game window's input messages (keys, mouse), for the input-mode log (input_capture.cpp).
|
|
void note_input_message(UINT message, WPARAM wp) noexcept;
|
|
}
|