Currently, the code "hardwareinfo" (source) is obtained. Now, you can use "hardwareinfo" and the function getgraphics (source) to obtain the memory and video card information respectively, prompting you whether to lower the game settings.
However, adjustments to hardware acceleration cannot be made to adjust the number of cells, and d3d is completely disabled.
The program may discard the starter "Minecraft. Jar" and write a more flexible startup method. You can determine the allocated memory size and user name. We plan to make this part based on the minecraftsp principle (source.
So there are a lot of difficulties to solve. Please try again!
Tips
Function for getting the memory capacity and page file size quickly:
Void getmemoryinfo () {system_info sysinfo; char STR [max_path]; // get the hardware informationgetsysteminfo (& sysinfo); ITOA (sysinfo. dwpagesize, STR, 10); char * m_stpagesize = STR; cout <"virtual memory capacity" <m_stpagesize <"M" <Endl; char * memstr; _ memorystatus MEM;: globalmemorystatus (& MEm); ITOA (mem. dwtotalphys/(1024*1024), STR, 10); memstr = STR; cout <"memory capacity" <memstr <"M" <Endl ;}