mirror of
https://github.com/ondra-novak/gates_of_skeldal.git
synced 2025-07-05 06:00:33 -04:00
linux release build, cleanup repository
This commit is contained in:
parent
529b3e8bf8
commit
3d8ee275e4
441 changed files with 280 additions and 65861 deletions
|
@ -7,6 +7,7 @@
|
|||
|
||||
#include <cmath>
|
||||
#include <iostream>
|
||||
#include <fstream>
|
||||
#include <stdexcept>
|
||||
#include <sstream>
|
||||
void SDLContext::SDL_Deleter::operator ()(SDL_Window* window) {
|
||||
|
@ -613,3 +614,17 @@ void SDLContext::pause_audio(bool pause) {
|
|||
void SDLContext::close_audio() {
|
||||
_audio.reset();
|
||||
}
|
||||
|
||||
void SDLContext::set_window_icon(const void *icon_data, size_t icon_size) {
|
||||
SDL_Surface *surface = SDL_LoadBMP_RW(SDL_RWFromConstMem(icon_data, icon_size), 1);
|
||||
if (surface == 0) {
|
||||
char buff[256];
|
||||
snprintf(buff,sizeof(buff),"Can't load icon: %s", SDL_GetError());
|
||||
display_error(buff);
|
||||
std::ofstream x("test.dat", std::ios::out|std::ios::binary|std::ios::trunc);
|
||||
x.write(reinterpret_cast<const char *>(icon_data), icon_size);
|
||||
} else {
|
||||
SDL_SetWindowIcon(_window.get(), surface);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue