minor change

This commit is contained in:
True Zhuanjia
2024-06-01 13:05:14 +08:00
parent 1e54c2d16f
commit c629a1d5d5
+1 -1
View File
@@ -106,7 +106,7 @@ StreamView *streamView;
+ (void)populatePointerId:(UITouch*)touch{
uint64_t eventAddrValue = (uint64_t)touch;
uint32_t randomPointerId = arc4random_uniform(UINT32_MAX); // generate pointerId from eletronic noise.
while(true){
for(;;){
if([pointerIdSet containsObject:@(randomPointerId)]) randomPointerId = arc4random_uniform(UINT32_MAX); // in case of new pointerId collides with existing ones, generate again.
else{ // populate pointerId into NSDict & NSSet.
[pointerIdDict setObject:@(randomPointerId) forKey:@(eventAddrValue)];