Skip to content

Instantly share code, notes, and snippets.

// #include <string>
#include <map>
std::map<std::string, int> scrapeId{
{"megadrive",1},
{"snes",4},
{"psx",57},
{"ps2",58}
};
// ROMs Downloader using ImGui Library
// Dhani Novan 25 Mei 2024 Cempaka Putih Jakarta
// TODO:
// 1. (done) Check target path if exists confirm to continue download or cancel download
// Note: now if target path if exists, it won't displayed in result
// 2. (done) Clipping for result
// 3. Scrape
// 4. Build database using lua script
#include "imgui.h"
#include <guis/GuiMsgBoxScroll2.h>
#include <components/TextComponent.h>
#include <components/ButtonComponent.h>
#include <components/MenuComponent.h> // for makeButtonGrid
#define ES_DIR1 "/recalbox/share_init/system/.emulationstation"
#define BUFFER_SIZE 1024
int ReadHelpContent(const char *filename, int content_number, String &content){
FILE *fi = fopen(filename, "r");
@leonkasovan
leonkasovan / joysticks.c
Created February 2, 2024 13:47
joysticks.c
//========================================================================
// Joystick input test
// Copyright (c) Camilla Löwy <elmindreda@glfw.org>
//
// This software is provided 'as-is', without any express or implied
// warranty. In no event will the authors be held liable for any damages
// arising from the use of this software.
//
// Permission is granted to anyone to use this software for any purpose,
// including commercial applications, and to alter it and redistribute it
@leonkasovan
leonkasovan / drm-gbm.c
Created January 19, 2024 08:19
drm-gbm
// gcc -o drm-gbm drm-gbm.c -ldrm -lgbm -lEGL -lGL -I/usr/include/libdrm
// general documentation: man drm
#include <xf86drm.h>
#include <xf86drmMode.h>
#include <gbm.h>
#include <EGL/egl.h>
#include <GLES2/gl2.h>
#include <stdlib.h>