Skip to content

Commit 5d3c503

Browse files
committed
set SDL window title
1 parent 6b79464 commit 5d3c503

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

examples/heif_view.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -312,7 +312,7 @@ int main(int argc, char** argv)
312312
// --- open output window
313313

314314
SDL_YUV_Display sdlWindow;
315-
bool success = sdlWindow.init(w, h, SDL_YUV_Display::SDL_CHROMA_420);
315+
bool success = sdlWindow.init(w, h, SDL_YUV_Display::SDL_CHROMA_420, "heif-view");
316316
if (!success) {
317317
std::cerr << "Cannot open output window\n";
318318
return 10;

examples/sdl.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,8 @@
2828
#include <assert.h>
2929

3030

31-
bool SDL_YUV_Display::init(int frame_width, int frame_height, enum SDL_Chroma chroma)
31+
bool SDL_YUV_Display::init(int frame_width, int frame_height, enum SDL_Chroma chroma,
32+
const char* window_title)
3233
{
3334
// reduce image size to a multiple of 8 (apparently required by YUV overlay)
3435

@@ -44,7 +45,6 @@ bool SDL_YUV_Display::init(int frame_width, int frame_height, enum SDL_Chroma ch
4445
}
4546

4647
// set window title
47-
const char *window_title = "SDL YUV display";
4848
mWindow = SDL_CreateWindow(window_title,
4949
SDL_WINDOWPOS_UNDEFINED, SDL_WINDOWPOS_UNDEFINED,
5050
frame_width, frame_height, 0);

examples/sdl.hh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ public:
3838
SDL_CHROMA_444 =444
3939
};
4040

41-
bool init(int frame_width, int frame_height, enum SDL_Chroma chroma = SDL_CHROMA_420);
41+
bool init(int frame_width, int frame_height, enum SDL_Chroma chroma, const char* window_title);
4242
void display(const unsigned char *Y, const unsigned char *U, const unsigned char *V,
4343
int stride, int chroma_stride);
4444
void close();

0 commit comments

Comments
 (0)