[keel,nostalgia,turbine] Cleanup

This commit is contained in:
2023-11-23 01:46:11 -06:00
parent a84a829769
commit b946e428ad
30 changed files with 120 additions and 122 deletions

View File

@ -21,7 +21,7 @@ void setClipboardText(Context &ctx, ox::CRStringView text) noexcept {
auto &gctx = static_cast<GlfwContext&>(ctx);
auto cstr = ox_malloca(text.bytes() + 1, char);
ox_strncpy(cstr.get(), text.data(), text.bytes());
glfwSetClipboardString(gctx.window, cstr);
glfwSetClipboardString(gctx.window, cstr.get());
}
}

View File

@ -220,8 +220,9 @@ ox::Error initGfx(Context &ctx) noexcept {
glfwWindowHint(GLFW_RESIZABLE, GLFW_TRUE);
auto cstr = ox_malloca(ctx.keelCtx.appName.bytes() + 1, char);
ox_strncpy(cstr.get(), ctx.keelCtx.appName.data(), ctx.keelCtx.appName.bytes());
constexpr auto Scale = 5;
gctx.window = glfwCreateWindow(240 * Scale, 160 * Scale, cstr, nullptr, nullptr);
//constexpr auto Scale = 5;
//gctx.window = glfwCreateWindow(240 * Scale, 160 * Scale, cstr, nullptr, nullptr);
gctx.window = glfwCreateWindow(868, 741, cstr.get(), nullptr, nullptr);
if (gctx.window == nullptr) {
return OxError(1, "Could not open GLFW window");
}
@ -250,7 +251,7 @@ void setWindowTitle(Context &ctx, ox::CRStringView title) noexcept {
auto &gctx = glctx(ctx);
auto cstr = ox_malloca(title.bytes() + 1, char);
ox_strncpy(cstr.get(), title.data(), title.bytes());
glfwSetWindowTitle(gctx.window, cstr);
glfwSetWindowTitle(gctx.window, cstr.get());
}
void focusWindow(Context &ctx) noexcept {