Skip to content

Instantly share code, notes, and snippets.

@KiyoNetcat
KiyoNetcat / stretch.diff
Created March 17, 2024 08:33
Patch to https://github.com/RoblKyogre/Sunshine to stretch the stream to the output aspect ratio
diff --git a/src/platform/linux/cuda.cu b/src/platform/linux/cuda.cu
index 8fb1a5e..6f4928d 100644
--- a/src/platform/linux/cuda.cu
+++ b/src/platform/linux/cuda.cu
@@ -259,9 +259,13 @@ tex_t::~tex_t() {
sws_t::sws_t(int in_width, int in_height, int out_width, int out_height, int pitch, int threadsPerBlock, ptr_t &&color_matrix)
: threadsPerBlock { threadsPerBlock }, color_matrix { std::move(color_matrix) } {
// Ensure aspect ratio is maintained
- auto scalar = std::fminf(out_width / (float)in_width, out_height / (float)in_height);
+ /*auto scalar = std::fminf(out_width / (float)in_width, out_height / (float)in_height);
@KiyoNetcat
KiyoNetcat / markdown-editor.html
Last active March 22, 2023 17:39
Extremely Basic Markdown Editor in HTML (/w Live Preview & Download)
<!DOCTYPE html>
<html lang="">
<head>
<meta charset="utf-8">
<title>Extremely Basic Markdown Editor</title>
<style>
#divoutput {border: 0px; padding: 0px; margin: 0px; float: right; width: 50%}
#divinput {border: 0px; padding: 0px; margin: 0px; float: left; width: 50%}
</style>
</head>
@KiyoNetcat
KiyoNetcat / gow.sh
Last active February 6, 2023 20:12
Script to automate setting up and running Games on Whales
#!/bin/bash
# Create Necessary Files in Temp
cd /tmp
if [ ! -d "/tmp/gow" ]; then git clone https://github.com/games-on-whales/gow.git; fi
cd gow
wget -O /tmp/edid.txt https://raw.githubusercontent.com/games-on-whales/gow/master/docs/modules/ROOT/examples/edid.txt