소스 검색

drivers/vulkan: limit pEngineName to only the engine name, without its version

It's supposed to be something stable that can be used to identify the engine
(using an equality check), so having the version number in there defeats
the purpose.

While at it, there is no need to prefix it with a second `"GodotEngine"`, nor
to copy the static C string into a C++ string to then extract a C string
from it :)
Eric Engestrom 3 년 전
부모
커밋
83333f7e15
1개의 변경된 파일1개의 추가작업 그리고 3개의 파일을 삭제
  1. 1 3
      drivers/vulkan/vulkan_context.cpp

+ 1 - 3
drivers/vulkan/vulkan_context.cpp

@@ -628,14 +628,12 @@ Error VulkanContext::_create_physical_device() {
 	}
 
 	CharString cs = ProjectSettings::get_singleton()->get("application/config/name").operator String().utf8();
-	String name = "GodotEngine " + String(VERSION_FULL_NAME);
-	CharString namecs = name.utf8();
 	const VkApplicationInfo app = {
 		/*sType*/ VK_STRUCTURE_TYPE_APPLICATION_INFO,
 		/*pNext*/ nullptr,
 		/*pApplicationName*/ cs.get_data(),
 		/*applicationVersion*/ 0,
-		/*pEngineName*/ namecs.get_data(),
+		/*pEngineName*/ VERSION_NAME,
 		/*engineVersion*/ VK_MAKE_VERSION(VERSION_MAJOR, VERSION_MINOR, VERSION_PATCH),
 		/*apiVersion*/ VK_MAKE_VERSION(vulkan_major, vulkan_minor, 0)
 	};