This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <Windows.h> | |
#include <SetupApi.h> | |
#include <cfgmgr32.h> // MAX_DEVICE_ID_LEN | |
#include <iostream> | |
#include <vector> | |
#include <string> | |
#include <map> | |
#pragma comment(lib, "setupapi.lib") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// This file contains code on how to convert a string to lowercase at compile time. | |
// A large part of the imlementation was taken from http://stackoverflow.com/a/15912824/3161376 which solved the problems that I had in the old implementation. | |
// The string struct will hold our data | |
// The declaration of our string struct that will contain the character array | |
template<char... str> | |
struct string | |
{ | |
// The characters are immediately converted to lowercase when they are put in the array |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <SFML/Graphics.hpp> | |
#if _WIN32_WINNT < 0x0501 | |
#define _WIN32_WINNT 0x0501 | |
#endif | |
#include <windows.h> | |
// Set part of the window that can be clicked by removing fully transparent pixels from the region | |
void setShape(HWND hWnd, const sf::Image& image) | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <functional> | |
#include <iostream> | |
// The function that we are going to call, it just prints out the variable here. | |
// This function can even receive a reference to the variable and change it! | |
template <typename T> | |
void print(T& obj) | |
{ | |
std::cout << obj << std::endl; | |
} |