mirror of
https://github.com/thunderbrewhq/thunderbrew
synced 2025-12-12 19:22:30 +00:00
feat(sound): Small script related improvements
* chore(build): rename src/util/Log.* to SysMessage.* * chore(ui): implement SetNonSpaceWrap() for error messages * chore(ui): move Video Script methods into CGVideoOptions class * chore(script): temporary fix GetNumOutputDrivers to eliminate loading errors * feat(sound): add SI2 Log methods * chore(sound): add SI2 CVars * chore(ui): implement Script_PlayGlueMusic * chore(sound): update SI2::Init() * fix: resolve compilation errors in variadic macros SI2_ERR and SI2_LOG --------- Co-authored-by: Tristan Cormier <cormiert2@outlook.com>
This commit is contained in:
parent
8596860120
commit
32cfe08d0b
21 changed files with 366 additions and 73 deletions
45
src/gx/CGVideoOptions.cpp
Normal file
45
src/gx/CGVideoOptions.cpp
Normal file
|
|
@ -0,0 +1,45 @@
|
|||
#include "gx/CGVideoOptions.hpp"
|
||||
#include "ui/FrameScript.hpp"
|
||||
#include "util/Unimplemented.hpp"
|
||||
|
||||
int32_t Script_GetCurrentResolution(lua_State* L) {
|
||||
WHOA_UNIMPLEMENTED(0);
|
||||
}
|
||||
|
||||
int32_t Script_GetScreenResolutions(lua_State* L) {
|
||||
WHOA_UNIMPLEMENTED(0);
|
||||
}
|
||||
|
||||
int32_t Script_GetRefreshRates(lua_State* L) {
|
||||
WHOA_UNIMPLEMENTED(0);
|
||||
}
|
||||
|
||||
int32_t Script_GetCurrentMultisampleFormat(lua_State* L) {
|
||||
WHOA_UNIMPLEMENTED(0);
|
||||
}
|
||||
|
||||
int32_t Script_GetMultisampleFormats(lua_State* L) {
|
||||
WHOA_UNIMPLEMENTED(0);
|
||||
}
|
||||
|
||||
int32_t Script_IsStereoVideoAvailable(lua_State* L) {
|
||||
WHOA_UNIMPLEMENTED(0);
|
||||
}
|
||||
|
||||
FrameScript_Method CGVideoOptions::s_ScriptFunctions[] = {
|
||||
{ "GetCurrentResolution", &Script_GetCurrentResolution },
|
||||
{ "GetScreenResolutions", &Script_GetScreenResolutions },
|
||||
{ "GetRefreshRates", &Script_GetRefreshRates },
|
||||
{ "GetCurrentMultisampleFormat", &Script_GetCurrentMultisampleFormat },
|
||||
{ "GetMultisampleFormats", &Script_GetMultisampleFormats },
|
||||
{ "IsStereoVideoAvailable", &Script_IsStereoVideoAvailable },
|
||||
{ nullptr, nullptr }
|
||||
};
|
||||
|
||||
void CGVideoOptions::RegisterScriptFunctions() {
|
||||
FrameScript_Method* item = s_ScriptFunctions;
|
||||
while (item->name) {
|
||||
FrameScript_RegisterFunction(item->name, item->method);
|
||||
item++;
|
||||
}
|
||||
}
|
||||
16
src/gx/CGVideoOptions.hpp
Normal file
16
src/gx/CGVideoOptions.hpp
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
#ifndef GX_C_GX_VIDEO_OPTIONS_HPP
|
||||
#define GX_C_GX_VIDEO_OPTIONS_HPP
|
||||
|
||||
#include "ui/Types.hpp"
|
||||
#include <cstdint>
|
||||
|
||||
class CGVideoOptions {
|
||||
public:
|
||||
// Static variables
|
||||
static FrameScript_Method s_ScriptFunctions[];
|
||||
|
||||
// Static functions
|
||||
static void RegisterScriptFunctions();
|
||||
};
|
||||
|
||||
#endif
|
||||
Loading…
Add table
Add a link
Reference in a new issue