3 Commits 06ec275bda ... 21421c248a

Author SHA1 Message Date
  TheMonsterFromTheDeep 21421c248a Change icon to include quaver 6 years ago
  TheMonsterFromTheDeep 522ce8cc07 Don't display blank id3 data 6 years ago
  TheMonsterFromTheDeep d0389dbc54 Remove debug messages 6 years ago
5 changed files with 33 additions and 14 deletions
  1. BIN
      icon.ico
  2. BIN
      img/logo.png
  3. 27 3
      img/logo.svg
  4. 6 0
      src/id3.c
  5. 0 11
      src/render.c

BIN
icon.ico


BIN
img/logo.png


File diff suppressed because it is too large
+ 27 - 3
img/logo.svg


+ 6 - 0
src/id3.c

@@ -12,6 +12,12 @@ char *new_string_from(size_t required_length, char *source) {
 	char *new_string = (char*)malloc(new_size);
 	strncpy_s(new_string, new_size, source, required_length);
 	new_string[required_length] = '\0';
+
+	if (strlen(new_string) < 1) {
+		free(new_string);
+		new_string = NULL;
+	}
+
 	return new_string;
 }
 

+ 0 - 11
src/render.c

@@ -239,9 +239,6 @@ static void load_image(GLuint *target, const char *path) {
 	int channels;
 	stbi_set_flip_vertically_on_load(1);
 	unsigned char *raw_data = stbi_load(path, &width, &height, &channels, 4);
-	if (!raw_data) {
-		OutputDebugString("Couldn't load image data\n");
-	}
 
 	glBindTexture(GL_TEXTURE_2D, *target);
 	glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, width, height, 0, GL_RGBA, GL_UNSIGNED_BYTE, raw_data);
@@ -253,10 +250,6 @@ static void load_image(GLuint *target, const char *path) {
 
 	glBindTexture(GL_TEXTURE_2D, 0);
 
-	if (glGetError()) {
-		OutputDebugString("GOt error while loading image\n");
-	}
-
 	stbi_image_free(raw_data);
 }
 
@@ -299,10 +292,6 @@ int render_init(char *playlist) {
 	glOrtho(0, width, 0, dpi_y(C_SIZE), -10, 10);
 	glMatrixMode(GL_MODELVIEW);
 
-	char help[128];
-	snprintf(help, 128, "App width: %d\n", width);
-	OutputDebugString(help);
-
 	return width;
 }