4 커밋 d791ca366b ... a6bc7d43f4

작성자 SHA1 메시지 날짜
  namark a6bc7d43f4 oi! 3 달 전
  namark 59e8cb7a71 Library updates. 3 달 전
  namark e12b20a168 Compilers be that freakin different?? 3 달 전
  namark 541a3bc777 Useless thing. 3 달 전
5개의 변경된 파일9개의 추가작업 그리고 11개의 파일을 삭제
  1. 1 4
      COPYRIGHT
  2. 1 1
      Makefile
  3. 4 3
      source/main.cpp
  4. 1 1
      source/simple.hpp
  5. 2 2
      source/utils.hpp

+ 1 - 4
COPYRIGHT

@@ -2,11 +2,8 @@
 	melno - simple little monochrome countdown timer
 	https://notabug.org/namark/melno
 	https://git.sr.ht/~namark/melno
-	https://git.qoto.org/namark/melno
-	https://gitlab.com/namark/melno
-	https://github.com/namark/melno
 
-	Copyright (C) 2017-2023 respective authors/contributors
+	Copyright (C) 2017-2024 respective authors/contributors
 
 	This program is free software: you can redistribute it and/or modify
 	it under the terms of the GNU General Public License as published by

+ 1 - 1
Makefile

@@ -6,7 +6,7 @@ override CPPFLAGS	+= -I./include -I./source
 override LDFLAGS	+= $(shell cat .ldflags | xargs)
 override LDFLAGS	+= -L./lib
 override LDLIBS		+= $(shell cat .ldlibs | xargs)
-override LDLIBS		+= -lSDL2main -lSDL2 -lpthread
+override LDLIBS		+= -lSDL2 -lpthread
 
 PREFIX	:= $(DESTDIR)/usr/local
 BINDIR	:= $(PREFIX)/bin

+ 4 - 3
source/main.cpp

@@ -123,7 +123,7 @@ int main(int argc, const char** argv) try
 	auto autorestart_count_display_size = int2{8,15};
 	auto& autorestart_count_display = ui.make<digit_display<1>>(autorestart_count_display_size, int2{1,0}, fg_color);
 	autorestart_count_display.set(autorestart_count);
-	auto player = [&music_playing, &music_done, &music, i = loop(music->buffer()), play_count = unsigned(0),
+	auto player = [&music_playing, &music_done, i = loop(music->buffer()),
 		 max_play_count = argc > 9 ? ston<unsigned>(argv[9]) : unsigned(5)]
 	(auto& device, auto buffer) mutable
 	{
@@ -134,9 +134,10 @@ int main(int argc, const char** argv) try
 			return;
 		}
 
-		std::copy_n(i, buffer.size, buffer.begin());
+		auto buffer_size = buffer.end() - buffer.begin();
+		std::copy_n(i, buffer_size, buffer.begin());
 
-		i += buffer.size;
+		i += buffer_size;
 		if(max_play_count != 0 && unsigned(i.count()) == max_play_count)
 			music_done = true;
 	};

+ 1 - 1
source/simple.hpp

@@ -7,7 +7,7 @@
 #include "simple/support.hpp"
 #include "simple/geom.hpp"
 #include "simple/graphical.hpp"
-#include "simple/interactive.hpp"
+#include "simple/interactive.h"
 #include "simple/musical.hpp"
 
 using namespace simple;

+ 2 - 2
source/utils.hpp

@@ -52,7 +52,7 @@ class loop
 	constexpr loop operator++(int)
 	{
 		loop ret = loop(range, current);
-		*this.operator++();
+		operator++();
 		return ret;
 	}
 
@@ -70,7 +70,7 @@ class loop
 	constexpr loop operator--(int)
 	{
 		loop ret = loop(range, current);
-		*this.operator--();
+		operator--();
 		return ret;
 	}