Skip to content

Instantly share code, notes, and snippets.

This file has been truncated, but you can view the full file.
Frame 0
glXGetCurrentContext( ) = ptr=0x56186E070508
glGetString( GL_VERSION ) = ["4.6.0 NVIDIA 390.48"]
glGetString( GL_VERSION ) = ["4.6.0 NVIDIA 390.48"]
glGenTextures( 1, ptr=0x7FFEB545F784 size=4 elements=1 pointee_type=GLUINT [38] )
glXGetCurrentContext( ) = ptr=0x56186E070508
glGetString( GL_VERSION ) = ["4.6.0 NVIDIA 390.48"]
glGetString( GL_VERSION ) = ["4.6.0 NVIDIA 390.48"]
glBindTexture( GL_TEXTURE_2D, 38 )
glXGetCurrentContext( ) = ptr=0x56186E070508
// Expected output:
// r=0
// r=1
#include <xboxrt/debug.h>
#include <pbkit/pbkit.h>
#include <hal/xbox.h>
#include "stdio.h"
#include <setjmp.h>
#include <stdio.h>
#include <xboxkrnl/xboxkrnl.h>
#include <assert.h>
#include <string.h>
int main() {
FILE *fp;
fp = fopen("D:\\test.txt", "w");
assert(fp != NULL);
@thrimbor
thrimbor / main.cpp
Created April 5, 2019 12:43
Simple C++ NXDK sample
#include <xboxrt/debug.h>
#include <pbkit/pbkit.h>
#include <hal/xbox.h>
#include "stdio.h"
class Testclass {
public:
Testclass();
bool worked;
};
@thrimbor
thrimbor / main.c
Created April 10, 2019 23:31
List files with NXDK
#include <xboxrt/debug.h>
#include <pbkit/pbkit.h>
#include <hal/xbox.h>
#include "stdio.h"
#include <hal/fileio.h>
void main(void)
{
int i;
@thrimbor
thrimbor / main.c
Created May 21, 2019 10:03
WinAPI file finding test code
#include <stdio.h>
#include <fileapi.h>
#include <hal/winerror.h>
#include <xboxrt/debug.h>
#include <pbkit/pbkit.h>
#include <hal/xbox.h>
void listAll(const char * path)
{
WIN32_FIND_DATA findFileData;
@thrimbor
thrimbor / ac_proton.sh
Created July 25, 2019 19:29
Assetto Corsa on Proton
# Based on https://pastebin.com/f5eUDcr0, but fixed
export WINEPREFIX=~/SteamLibrary/steamapps/compatdata/244210/pfx # change if your steam library is somewhere else
winecfg #change to windows XP -> OK
wine uninstaller # uninstall all stuff related to .NET or Mono
wget 'http://download.microsoft.com/download/9/5/A/95A9616B-7A37-4AF6-BC36-D6EA96C8DAAE/dotNetFx40_Full_x86_x64.exe'
wine ~/dotNetFx40_Full_x86_x64.exe /q
winecfg # change to Windows 7, libraries -> add "mscoree" -> pick "mscoree" from list -> clicke edit -> set to "Native (Windows)" -> click OK and OK
wget 'http://download.microsoft.com/download/9/E/6/9E63300C-0941-4B45-A0EC-0008F96DD480/NDP471-KB4033342-x86-x64-AllOS-ENU.exe'
@thrimbor
thrimbor / gist:7d8515ad443edafc400fc046e414329e
Created January 6, 2020 01:43
Tests for nxdk InitOnce* API
#include <assert.h>
#include <hal/debug.h>
#include <hal/video.h>
#include <windows.h>
// expected output:
// > failing function running
// > failing function running
// > succeeding function running
// > tests done
#include <hal/debug.h>
#include <hal/video.h>
#include <windows.h>
// expected behavior:
// threads 1, 3, 4, 5 lock, threads 3, 4, 5 unlock (in any order)
// 5 second pause
// thread 1 unlocks
// thread 2 locks
// 5 second pause
#include <hal/debug.h>
#include <hal/video.h>
#include <windows.h>
#include <malloc.h>
#include <string.h>
// tests whether alloca overlaps other parts of the stack
// by writing into an alloca allocated buffer and then
// checking other variables on the stack. Also tests
// whether we can return properly afterwards